Warn leaving page after invoice item changes

This commit is contained in:
Hillel Coren 2016-09-12 09:44:26 +03:00
parent 359271d6c8
commit d6774fed60

View File

@ -1229,8 +1229,7 @@
if (!isEmailValid()) { if (!isEmailValid()) {
swal("{!! trans('texts.provide_email') !!}"); swal("{!! trans('texts.provide_email') !!}");
return; return;
8 } }
sweetConfirm(function() { sweetConfirm(function() {
var accountLanguageId = parseInt({{ $account->language_id ?: '0' }}); var accountLanguageId = parseInt({{ $account->language_id ?: '0' }});
@ -1469,6 +1468,8 @@
if (!hasEmpty) { if (!hasEmpty) {
model.invoice().addItem(); model.invoice().addItem();
} }
NINJA.formIsChanged = true;
} }
function onPartialChange(silent) function onPartialChange(silent)