From cdf0a425045340f977d982a09d732755fa948dba 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 Signed-off-by: Rebecca Coert --- .../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 9ae668e72e..e9cbc21e48 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt @@ -467,53 +467,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 %]
  • @@ -524,6 +484,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 ) %] @@ -1249,9 +1255,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(); @@ -1491,10 +1497,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