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

Fix for failed payment details

This commit is contained in:
Hillel Coren 2016-09-18 12:19:10 +03:00
parent e04a25d233
commit b6841a95c8
2 changed files with 19 additions and 14 deletions

View File

@ -1,5 +1,23 @@
@extends('payments.payment_method')
@section('head')
@parent
<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
@section('payment_details')
{!! Former::vertical_open($url)
@ -256,17 +274,4 @@
{!! 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

@ -9,7 +9,7 @@
Stripe.setPublishableKey('{{ $accountGateway->getPublishableStripeKey() }}');
$(function() {
var countries = {!! Cache::get('countries')->pluck('iso_3166_2','id') !!};
$('.payment-form').submit(function(event) {
$('.payment-form').unbind('submit').submit(function(event) {
if($('[name=plaidAccountId]').length)return;
var $form = $(this);