From 6b6a9006f41a52e3138ae4c80d16a39df8fe0083 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Thu, 21 Apr 2022 12:26:04 +0000 Subject: [PATCH] Bug 30579: Group next available hold options, and disable when item is chosen This patch rearranges options that only apply to next available holds and disables them when an item is checked. This is intended to make it more obvious which parts of the form apply to this selection To test: 1 - Apply patches 2 - Confirm you can successfully place single or multiple items on hold 3 - Confirm that when placing a single hold the next available options are grouped 4 - Confirm pickup location, specific item type, and number of holds all work for next available 5 - Confirm item level holds save pickup location correctly Signed-off-by: Andrew Fuerste-Henry --- .../prog/en/modules/reserve/request.tt | 94 ++++++++++--------- 1 file changed, 50 insertions(+), 44 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 cbef1ec10f..c0acbf807b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt @@ -465,53 +465,13 @@ -
  • - - -
  • - [% IF Koha.Preference('AllowHoldItemTypeSelection') %] -
  • - - -
  • - [% END %] [% IF ( reserve_in_future ) %]
  • [% END %] -
  • - - [% IF force_hold_level == 'item' %] - - [% ELSIF force_hold_level == 'record' %] - - - [% ELSE %] - - [% END %] - -
  • - [% IF remaining_holds_for_record > 1 %] -
  • - - -
  • - [% ELSE %] - - [% END %]
  • @@ -522,6 +482,52 @@ A non priority hold doesn't prevent a current checkout from renewing
  • +
    + + + +
      +
    1. + + +
    2. + [% IF Koha.Preference('AllowHoldItemTypeSelection') %] +
    3. + + +
    4. + [% END %] + [% IF remaining_holds_for_record > 1 %] +
    5. + + +
    6. + [% ELSE %] + + [% END %] +
    +
    [% IF ( patron.borrowernumber ) %] @@ -1246,9 +1252,9 @@ }); function ToggleHoldsToPlace() { if ( $("#requestany").prop('checked') ) { - $("#holds_to_place_count").prop('disabled', false); + $("#holds_to_place_count,#pickup,#itemtype").prop('disabled', false); } else { - $("#holds_to_place_count").prop('disabled', true); + $("#holds_to_place_count,#pickup,#itemtype").prop('disabled', true); } } ToggleHoldsToPlace(); @@ -1488,10 +1494,10 @@ }); if(onechecked == 1){ $("#requestany").prop("checked", false); - $("#holds_to_place_count").prop('disabled', true); + $("#holds_to_place_count,#pickup,#itemtype").prop('disabled', true); } else { $("#requestany").prop("checked",true); - $("#holds_to_place_count").prop('disabled', false); + $("#holds_to_place_count,#pickup,#itemtype").prop('disabled', false); } }); var prev_rank_request; -- 2.30.2