From a462a7099d0088a826dced9dc1b1b45d9f68f9a4 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sun, 6 Oct 2024 20:39:32 +1100 Subject: [PATCH] Remove comments from blades to prevent Alpine.js from having a heart attack --- .../gateways/paypal/pay_livewire.blade.php | 4 ++-- .../gateways/paypal/ppcp/card.blade.php | 6 +----- .../paypal/ppcp/card_livewire.blade.php | 21 ++----------------- .../gateways/paypal/ppcp/pay.blade.php | 4 +--- .../paypal/ppcp/pay_livewire.blade.php | 3 +-- 5 files changed, 7 insertions(+), 31 deletions(-) diff --git a/resources/views/portal/ninja2020/gateways/paypal/pay_livewire.blade.php b/resources/views/portal/ninja2020/gateways/paypal/pay_livewire.blade.php index 73b5409491..ba23dd18bb 100644 --- a/resources/views/portal/ninja2020/gateways/paypal/pay_livewire.blade.php +++ b/resources/views/portal/ninja2020/gateways/paypal/pay_livewire.blade.php @@ -89,7 +89,7 @@ @@ -135,7 +135,7 @@ if (!response.ok) { throw new Error('Network response was not ok ' + response.statusText); } - return response.json(); // or response.json() if the response is JSON + return response.json(); }) .then(data => { diff --git a/resources/views/portal/ninja2020/gateways/paypal/ppcp/card.blade.php b/resources/views/portal/ninja2020/gateways/paypal/ppcp/card.blade.php index f4862b6353..36e416dd41 100644 --- a/resources/views/portal/ninja2020/gateways/paypal/ppcp/card.blade.php +++ b/resources/views/portal/ninja2020/gateways/paypal/ppcp/card.blade.php @@ -84,7 +84,7 @@ @@ -193,12 +193,8 @@ }); - // Render each field after checking for eligibility if (cardField.isEligible()) { - // const nameField = cardField.NameField(); - // nameField.render("#card-name-field-container"); - const numberField = cardField.NumberField({ inputEvents: { onChange: (event)=> { diff --git a/resources/views/portal/ninja2020/gateways/paypal/ppcp/card_livewire.blade.php b/resources/views/portal/ninja2020/gateways/paypal/ppcp/card_livewire.blade.php index 6e9738873a..c5be85ba95 100644 --- a/resources/views/portal/ninja2020/gateways/paypal/ppcp/card_livewire.blade.php +++ b/resources/views/portal/ninja2020/gateways/paypal/ppcp/card_livewire.blade.php @@ -73,7 +73,7 @@ @@ -169,32 +169,15 @@ window.location.href = "/client/invoices/{{ $invoice_hash }}"; }, - // onError: function(error) { - - - // console.log("submit catch"); - // const errorM = parseError(error); - - // console.log(errorM); - - // const msg = handle422Error(errorM); - - // document.getElementById('errors').textContent = `Sorry, your transaction could not be processed...\n\n${msg.description}`; - // document.getElementById('errors').hidden = false; - - // }, + onClick: function (){ } }); - // Render each field after checking for eligibility if (cardField.isEligible()) { - // const nameField = cardField.NameField(); - // nameField.render("#card-name-field-container"); - const numberField = cardField.NumberField({ inputEvents: { onChange: (event)=> { diff --git a/resources/views/portal/ninja2020/gateways/paypal/ppcp/pay.blade.php b/resources/views/portal/ninja2020/gateways/paypal/ppcp/pay.blade.php index 2a1cc05253..1191af29bf 100644 --- a/resources/views/portal/ninja2020/gateways/paypal/ppcp/pay.blade.php +++ b/resources/views/portal/ninja2020/gateways/paypal/ppcp/pay.blade.php @@ -28,7 +28,7 @@ @@ -37,7 +37,6 @@ @@ -94,7 +94,6 @@ document.getElementById("server_response").submit(); }, onClick: function (){ - // document.getElementById('paypal-button-container').hidden = true; } }).render('#paypal-button-container').catch(function(err) {