1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Remove comments from blades to prevent Alpine.js from having a heart attack

This commit is contained in:
David Bomba 2024-10-06 20:39:32 +11:00
parent 5c9dc24ea2
commit a462a7099d
5 changed files with 7 additions and 31 deletions

View File

@ -89,7 +89,7 @@
<script type="application/json" fncls="fnparams-dede7cc5-15fd-4c75-a9f4-36c430ee3a99">
{
"f":"{{ $guid }}",
"s":"paypal.pay" // unique ID for each web page
"s":"paypal.pay"
}
</script>
</div>
@ -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 => {

View File

@ -84,7 +84,7 @@
<script type="application/json" fncls="fnparams-dede7cc5-15fd-4c75-a9f4-36c430ee3a99">
{
"f":"{{ $guid }}",
"s":"{{ $identifier }}" // unique ID for each web page
"s":"{{ $identifier }}"
}
</script>
@ -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)=> {

View File

@ -73,7 +73,7 @@
<script type="application/json" fncls="fnparams-dede7cc5-15fd-4c75-a9f4-36c430ee3a99">
{
"f":"{{ $guid }}",
"s":"{{ $identifier }}" // unique ID for each web page
"s":"{{ $identifier }}"
}
</script>
</div>
@ -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)=> {

View File

@ -28,7 +28,7 @@
<script type="application/json" fncls="fnparams-dede7cc5-15fd-4c75-a9f4-36c430ee3a99">
{
"f":"{{ $guid }}",
"s":"paypal.ppcp.pay" // unique ID for each web page
"s":"paypal.ppcp.pay"
}
</script>
@ -37,7 +37,6 @@
<script src="https://www.paypal.com/sdk/js?client-id={!! $client_id !!}&currency={!! $currency !!}&merchant-id={!! $merchantId !!}&components=buttons,funding-eligibility&intent=capture&enable-funding={!! $funding_source !!}" data-partner-attribution-id="invoiceninja_SP_PPCP"></script>
<script>
const fundingSource = "{!! $funding_source !!}";
const clientId = "{{ $client_id }}";
const orderId = "{!! $order_id !!}";
@ -108,7 +107,6 @@
document.getElementById("server_response").submit();
},
onClick: function (){
// document.getElementById('paypal-button-container').hidden = true;
}
}).render('#paypal-button-container').catch(function(err) {

View File

@ -17,7 +17,7 @@
<script type="application/json" fncls="fnparams-dede7cc5-15fd-4c75-a9f4-36c430ee3a99">
{
"f":"{{ $guid }}",
"s":"paypal.ppcp.pay" // unique ID for each web page
"s":"paypal.ppcp.pay"
}
</script>
</div>
@ -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) {