From 7d80625edf7b3ae4c1248cbe6f0b0c1219e7247e 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 Signed-off-by: Katrin Fischer --- 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 6932d49f90..30c63ed0d5 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 96834cb6cd..95b208e148 100755 --- a/opac/opac-reserve.pl +++ b/opac/opac-reserve.pl @@ -638,6 +638,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.17.1