From 7f163b93ec2aa111b2c8c01aa85f7779fe514b20 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Tue, 22 May 2018 11:46:10 -0300 Subject: [PATCH] Bug 20703: Add confirmation modal when making a credit void Signed-off-by: Tomas Cohen Arazi Signed-off-by: Kyle M Hall --- koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt index 7ecaeb718d..a7f508d7ae 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt @@ -77,7 +77,7 @@ Reverse [% END %] [% IF account.amount < 0 %] - Void + Void [% END %] [% ELSE %]   @@ -141,6 +141,14 @@ table_account_fines.fnFilter(filteredValue, 4, true, false); $(this).toggleClass('filtered'); }); + + $(".void").on("click",function(e){ + if( confirm( _("Are you sure you want to void this credit?") ) ) { + return true; + } else { + e.preventDefault(); + } + }); }); [% END %] -- 2.15.1 (Apple Git-101)