From b0facf2e7c248e087f1e922cc9ba86922c96fd4e Mon Sep 17 00:00:00 2001 From: Tobias Reimann Date: Fri, 12 Aug 2016 10:27:28 -0700 Subject: [PATCH] Bug 17101 - Confirm a question before check in MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch enable a message for the user after he hit no, by the question in the check in window (new) Test plan: 1. Create an itemtype, with the checkinmsgtype question 2. Create an item with the itemtype from 1 3. Check out the item from 2 4. Check in the item from 3 5. Click no ==> item shouldn't be check in and a message should be displ ayed 6. Check in the item from 3 7. Click yes ==> item should be check in ed Optional: Before step 4 check others item in, to check if the prevouis check in's Sponsored-by: Bücherei Maichingen --- circ/returns.pl | 5 +++++ koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/circ/returns.pl b/circ/returns.pl index 3e050a6..2a384ee 100755 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -278,6 +278,11 @@ if ($barcode) { ); } } + elsif($itemtype->checkinmsgtype eq 'question' && $accept == '2'){ + $template->param( + checkinmsgtype => "rejected", + ); + } # make sure return branch respects home branch circulation rules, default to homebranch my $hbr = GetBranchItemRule($biblio->{'homebranch'}, $itemtype ? $itemtype->itemtype : undef )->{'returnbranch'} || "homebranch"; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt index eeb7626..dc667b2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -548,7 +548,11 @@ $(document).ready(function () { [% END%] - +[% IF checkinmsgtype == 'rejected' %] +
+

Your item was not checked in!

+
+[% END %] -- 2.7.4