From ead9e937b1c54269fcaa9933c5cdef2a4765a454 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Fri, 23 Sep 2022 15:06:05 +0000 Subject: [PATCH] Bug 30579: Disentangle multi-hold and single bib forms This patch simply groups the forms so that multi-hold and single hold are each in their own section While there is some duplication from this, it makes the sections easier to read and allows for more variation in the two forms To test: 1 - Place a single bib and multi bib hold in staff client 2 - Apply this patch 3 - Repeat and confirm nothing changes with this patch --- .../prog/en/modules/reserve/request.tt | 50 +++++++------------ reserve/placerequest.pl | 3 +- 2 files changed, 21 insertions(+), 32 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt index 0ed253f766..ac239eb3d3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt @@ -504,6 +504,7 @@
+ [% UNLESS ( multi_hold ) %]
Hold details
@@ -512,21 +513,9 @@ [% FOREACH biblionumber IN biblionumbers %] [% END %] - [% IF ( multi_hold ) %] - - - [% FOREACH biblioloo IN biblioloop %] - [% UNLESS biblioloo.none_avail %] - - - - [% END %] - [% END %] - [% ELSE %] - [% END # /IF multi_hold %]
  1. @@ -538,12 +527,10 @@ [% END %]
  2. - [% UNLESS ( multi_hold ) %] -
  3. - Estimated priority: - [% fixedRank | html %] -
  4. - [% END %] +
  5. + Estimated priority: + [% fixedRank | html %] +
  6. @@ -551,23 +538,14 @@
  7. - [% UNLESS ( multi_hold ) %] - - [% FOREACH pickup_location IN multi_pickup_locations %] - - [% END %] - [% END %]
  8. - [% UNLESS ( multi_hold ) %] [% IF Koha.Preference('AllowHoldItemTypeSelection') %]
  9. @@ -579,7 +557,6 @@
  10. [% END %] - [% END # /UNLESS multi_hold %] [% IF ( reserve_in_future ) %]
  11. @@ -593,7 +570,6 @@
  12. - [% UNLESS ( multi_hold ) %]
  13. [% IF force_hold_level == 'item' %] @@ -615,7 +591,6 @@ [% ELSE %] [% END %] - [% END # /UNLESS multi_hold %]
  14. @@ -624,7 +599,6 @@
- [% UNLESS ( multi_hold ) %]
[% IF ( patron.borrowernumber ) %] [% IF ( override_required ) %] @@ -865,6 +839,20 @@ [% END # /IF hiddencount %] [% ELSE # /UNLESS multi_hold %] +
+ Hold details + + + + + [% FOREACH biblioloo IN biblioloop %] + + [% UNLESS biblioloo.none_avail %] + + + + [% END %] + [% END %] diff --git a/reserve/placerequest.pl b/reserve/placerequest.pl index 0fc7361b73..4be82ff061 100755 --- a/reserve/placerequest.pl +++ b/reserve/placerequest.pl @@ -48,6 +48,7 @@ my $checkitem = $input->param('checkitem'); my $expirationdate = $input->param('expiration_date'); my $itemtype = $input->param('itemtype') || undef; my $non_priority = $input->param('non_priority'); +my $multi_holds = $input->param('multi_holds'); my $patron = Koha::Patrons->find( $borrowernumber ); @@ -102,7 +103,7 @@ if ( $patron ) { } } - } elsif (@biblionumbers > 1) { + } elsif (@biblionumbers > 1 || $multi_holds) { my $bibinfo = $bibinfos{$biblionumber}; if ( $can_override || CanBookBeReserved($patron->borrowernumber, $biblionumber)->{status} eq 'OK' ) { AddReserve( -- 2.30.2