Remember if send email receipt is checked
This commit is contained in:
parent
45834a6da5
commit
e0eec76691
1 changed files with 19 additions and 1 deletions
|
|
@ -71,7 +71,11 @@
|
|||
{!! Former::text('transaction_reference') !!}
|
||||
|
||||
@if (!$payment)
|
||||
{!! Former::checkbox('email_receipt')->label(' ')->text(trans('texts.email_receipt'))->value(1) !!}
|
||||
{!! Former::checkbox('email_receipt')
|
||||
->onchange('onEmailReceiptChange()')
|
||||
->label(' ')
|
||||
->text(trans('texts.email_receipt'))
|
||||
->value(1) !!}
|
||||
@endif
|
||||
|
||||
</div>
|
||||
|
|
@ -130,6 +134,12 @@
|
|||
$('.payment_date .input-group-addon').click(function() {
|
||||
toggleDatePicker('payment_date');
|
||||
});
|
||||
|
||||
if (isStorageSupported()) {
|
||||
if (localStorage.getItem('last:send_email_receipt')) {
|
||||
$('#email_receipt').prop('checked', true);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function onFormSubmit(event) {
|
||||
|
|
@ -151,6 +161,14 @@
|
|||
});
|
||||
}
|
||||
|
||||
function onEmailReceiptChange() {
|
||||
if (! isStorageSupported()) {
|
||||
return;
|
||||
}
|
||||
var checked = $('#email_receipt').is(':checked');
|
||||
localStorage.setItem('last:send_email_receipt', checked ? true : '');
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
@stop
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue