mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Disable save button on new payment page once clicked
This commit is contained in:
parent
9769f206f2
commit
89390e27ee
@ -14,11 +14,15 @@
|
|||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
|
|
||||||
{!! Former::open($url)->addClass('col-md-10 col-md-offset-1 warn-on-exit')->method($method)->rules(array(
|
{!! Former::open($url)
|
||||||
'client' => 'required',
|
->addClass('col-md-10 col-md-offset-1 warn-on-exit')
|
||||||
'invoice' => 'required',
|
->onsubmit('onFormSubmit(event)')
|
||||||
'amount' => 'required',
|
->method($method)
|
||||||
)) !!}
|
->rules(array(
|
||||||
|
'client' => 'required',
|
||||||
|
'invoice' => 'required',
|
||||||
|
'amount' => 'required',
|
||||||
|
)) !!}
|
||||||
|
|
||||||
@if ($payment)
|
@if ($payment)
|
||||||
{!! Former::populate($payment) !!}
|
{!! Former::populate($payment) !!}
|
||||||
@ -71,7 +75,7 @@
|
|||||||
<center class="buttons">
|
<center class="buttons">
|
||||||
{!! Button::normal(trans('texts.cancel'))->appendIcon(Icon::create('remove-circle'))->asLinkTo(URL::to('/payments'))->large() !!}
|
{!! Button::normal(trans('texts.cancel'))->appendIcon(Icon::create('remove-circle'))->asLinkTo(URL::to('/payments'))->large() !!}
|
||||||
@if (!$payment || !$payment->is_deleted)
|
@if (!$payment || !$payment->is_deleted)
|
||||||
{!! Button::success(trans('texts.save'))->appendIcon(Icon::create('floppy-disk'))->submit()->large() !!}
|
{!! Button::success(trans('texts.save'))->withAttributes(['id' => 'saveButton'])->appendIcon(Icon::create('floppy-disk'))->submit()->large() !!}
|
||||||
@endif
|
@endif
|
||||||
</center>
|
</center>
|
||||||
|
|
||||||
@ -106,6 +110,10 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function onFormSubmit(event) {
|
||||||
|
$('#saveButton').attr('disabled', true);
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@stop
|
@stop
|
||||||
|
Loading…
x
Reference in New Issue
Block a user