From f9077ac101d2fb35b66d9e23582ec14d64636402 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Fri, 23 Sep 2022 15:30:03 +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 --- .../prog/en/modules/reserve/request.tt | 90 ++++++++++--------- 1 file changed, 48 insertions(+), 42 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 beaed01f15..8a0a2fdf1e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt @@ -536,28 +536,6 @@ -
  • - - -
  • - - [% IF Koha.Preference('AllowHoldItemTypeSelection') %] -
  • - - -
  • - [% END %] - [% IF ( reserve_in_future ) %]
  • @@ -570,19 +548,51 @@
  • + +
  • + + + A non priority hold doesn't prevent a current checkout from renewing +
  • + +
    + + + + [% IF force_hold_level == 'item' %] + + [% ELSIF force_hold_level == 'record' %] + + + [% ELSE %] + + [% END %] + +
      +
    1. - - [% IF force_hold_level == 'item' %] - - [% ELSIF force_hold_level == 'record' %] - - - [% ELSE %] - - [% END %] - + +
    2. + [% IF Koha.Preference('AllowHoldItemTypeSelection') %] +
    3. + + +
    4. + [% END %] [% IF remaining_holds_for_record > 1 %]
    5. @@ -591,13 +601,9 @@ [% ELSE %] [% END %] +
    +
    -
  • - - - A non priority hold doesn't prevent a current checkout from renewing -
  • -
    [% IF ( patron.borrowernumber ) %] @@ -1285,9 +1291,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(); @@ -1523,10 +1529,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