From 1f2edbfb788f977e155d1957302596174812d170 Mon Sep 17 00:00:00 2001 From: Colin Campbell Date: Wed, 29 Jun 2011 17:25:49 +0100 Subject: [PATCH 2/3] Bug 7751 : HIGHHOLDS should be a single datastructure Data returned with HIGHHOLDS was being returned on the same level as the flag so that it might be interpreted as further items requiring confirmation. Instead of HIGHHOLDS being returned as a flag return it as a data structure containing that data. Change template to reflect this Conflicts: C4/Circulation.pm --- C4/Circulation.pm | 9 +++++---- .../prog/en/modules/circ/circulation.tt | 8 ++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 670bd3d..b57455e 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -935,10 +935,11 @@ sub CanBookBeIssued { #print "reserved: $reserved\n".Dumper($num); if ($num>=C4::Context->preference("decreaseLoanHighHoldsValue")) { - $needsconfirmation{HIGHHOLDS} = 1; - $needsconfirmation{'num_holds'} = $num; - $needsconfirmation{'duration'} = $duration; - $needsconfirmation{'returndate'} = format_date($returndate); + $needsconfirmation{HIGHHOLDS} = { + num_holds => $num, + duration => $duration, + returndate => format_date($returndate), + }; } } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt index cf75962..39153fa 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -285,15 +285,15 @@ function refocus(calendar) {
  • This item has been lost with a status of "[% ITEM_LOST %]". Check out anyway?
  • [% END %] -[% IF ( HIGHHOLDS ) %] -
  • High demand item. Loan period shortened to [% duration %] days (due [% returndate %]). Check out anyway?
  • +[% IF HIGHHOLDS %] +
  • High demand item. Loan period shortened to [% HIGHHOLDS.duration %] days (due [% HIGHHOLDS.returndate %]). Check out anyway?
  • [% END %] -[% IF ( HIGHHOLDS ) %] +[% IF HIGHHOLDS %] [% END %] -- 1.7.2.5