From 93079004f1d2076c74a437ebfece43212c2d5b68 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Wed, 28 Aug 2019 11:51:18 +0000 Subject: [PATCH] Bug 19718: Show message if patron has existing holds on a title To test: 1 - Set a rule to allow multiple holds on a title 2 - Place a single hold in the opac for a patron 3 - Return to record and attempt place a second hold 4 - Note there is no message but that you must match the type placed before (item or record level) 5 - Don't place the hold 6 - Apply patch 7 - Attempt to place second hold again 8 - Note there is a message informing you of which level hold you may place 9 - Test with both item/record level holds and placing a single request or multiple requests Signed-off-by: donnab --- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt | 8 +++++++- opac/opac-reserve.pl | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt index 64263ef9a3..2cdf56caec 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt @@ -158,9 +158,15 @@
[% FOREACH bibitemloo IN bibitemloop %] + [% IF ( bibitemloo.holdable ) %]
+ [% IF bibitemloo.forced_hold_level %] +
+ You already have at least one [% bibitemloo.forced_hold_level %] level hold on this title. + All further holds must be [% bibitemloo.forced_hold_level %] level. +
+ [% END %]

- [% IF ( bibitemloo.holdable ) %] diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl index 4d7cf1334c..2bdb2d58b0 100755 --- a/opac/opac-reserve.pl +++ b/opac/opac-reserve.pl @@ -629,6 +629,7 @@ foreach my $biblioNum (@biblionumbers) { if ($forced_hold_level) { $biblioLoopIter{force_hold} = 1 if $forced_hold_level eq 'item'; $biblioLoopIter{itemholdable} = 0 if $forced_hold_level eq 'record'; + $biblioLoopIter{forced_hold_level} = $forced_hold_level; } -- 2.11.0