From d6774fed601aa61a3d4f7caf70f8b01e9cf52fa4 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Mon, 12 Sep 2016 09:44:26 +0300 Subject: [PATCH] Warn leaving page after invoice item changes --- resources/views/invoices/edit.blade.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/resources/views/invoices/edit.blade.php b/resources/views/invoices/edit.blade.php index aa84defc1e..fb55da47a5 100644 --- a/resources/views/invoices/edit.blade.php +++ b/resources/views/invoices/edit.blade.php @@ -1229,8 +1229,7 @@ if (!isEmailValid()) { swal("{!! trans('texts.provide_email') !!}"); return; -8 } - + } sweetConfirm(function() { var accountLanguageId = parseInt({{ $account->language_id ?: '0' }}); @@ -1469,6 +1468,8 @@ if (!hasEmpty) { model.invoice().addItem(); } + + NINJA.formIsChanged = true; } function onPartialChange(silent)