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') !!}
|
{!! Former::text('transaction_reference') !!}
|
||||||
|
|
||||||
@if (!$payment)
|
@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
|
@endif
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -130,6 +134,12 @@
|
|||||||
$('.payment_date .input-group-addon').click(function() {
|
$('.payment_date .input-group-addon').click(function() {
|
||||||
toggleDatePicker('payment_date');
|
toggleDatePicker('payment_date');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (isStorageSupported()) {
|
||||||
|
if (localStorage.getItem('last:send_email_receipt')) {
|
||||||
|
$('#email_receipt').prop('checked', true);
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
function onFormSubmit(event) {
|
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>
|
</script>
|
||||||
|
|
||||||
@stop
|
@stop
|
||||||
|
Loading…
x
Reference in New Issue
Block a user