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

Working on payment gateways

This commit is contained in:
Hillel Coren 2018-03-16 10:10:05 +02:00
parent 4cdec24239
commit 5b6a48def8

View File

@ -49,10 +49,9 @@
}
}
if (NINJA.formIsSubmitted) {
if ($form.find('button').is(':disabled')) {
return false;
}
NINJA.formIsSubmitted = true;
// Disable the submit button to prevent repeated clicks
$form.find('button').prop('disabled', true);
@ -73,7 +72,6 @@
// Show the errors on the form
var error = response.error.message;
$form.find('button').prop('disabled', false);
NINJA.formIsSubmitted = false;
$('#js-error-message').html(error).fadeIn();
} else {
// response contains id and card, which contains additional card details