From 7f163b93ec2aa111b2c8c01aa85f7779fe514b20 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi <tomascohen@theke.io> 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 <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> --- 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 @@ <a href="boraccount.pl?action=reverse&accountlines_id=[% account.accountlines_id %]&borrowernumber=[% account.borrowernumber %]" class="btn btn-default btn-xs"><i class="fa fa-undo"></i> Reverse</a> [% END %] [% IF account.amount < 0 %] - <a href="boraccount.pl?action=void&accountlines_id=[% account.accountlines_id %]&borrowernumber=[% account.borrowernumber %]" class="btn btn-default btn-xs"><i class="fa fa-ban"></i> Void</a> + <a href="boraccount.pl?action=void&accountlines_id=[% account.accountlines_id %]&borrowernumber=[% account.borrowernumber %]" class="btn btn-default btn-xs void"><i class="fa fa-ban"></i> Void</a> [% 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(); + } + }); }); </script> [% END %] -- 2.15.1 (Apple Git-101)