mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Remember if send email receipt is checked
This commit is contained in:
parent
45834a6da5
commit
e0eec76691
@ -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…
x
Reference in New Issue
Block a user