Prevent double pay now click for non-Stripe gateways

This commit is contained in:
Hillel Coren 2016-09-04 00:15:50 +03:00
parent 188486641a
commit d740db676f
2 changed files with 14 additions and 13 deletions

View File

@ -256,4 +256,18 @@
{!! Former::close() !!}
<script type="text/javascript">
$(function() {
$('.payment-form').submit(function(event) {
var $form = $(this);
// Disable the submit button to prevent repeated clicks
$form.find('button').prop('disabled', true);
return true;
});
});
</script>
@stop

View File

@ -76,18 +76,5 @@
}
};
</script>
@else
<script type="text/javascript">
$(function() {
$('.payment-form').submit(function(event) {
var $form = $(this);
// Disable the submit button to prevent repeated clicks
$form.find('button').prop('disabled', true);
return true;
});
});
</script>
@endif
@stop