mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 10:34:30 -04:00
Fix for Braintree
This commit is contained in:
parent
53b1ce7a0f
commit
eb4fceede6
@ -56,16 +56,13 @@
|
||||
}
|
||||
},
|
||||
onPaymentMethodReceived: function(event) {
|
||||
if ($form.find('button').is(':disabled')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Disable the submit button to prevent repeated clicks
|
||||
$form.find('button').prop('disabled', true);
|
||||
$('#js-error-message').hide();
|
||||
|
||||
// Insert the token into the form so it gets submitted to the server
|
||||
$form.append($('<input type="hidden" name="sourceToken"/>').val(event.nonce));
|
||||
|
||||
// and submit
|
||||
$form.get(0).submit();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user