From bcf1fb579f7b0240c579f6eb4d6225b0879324bd Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Mon, 20 May 2024 22:05:43 +0000 Subject: [PATCH] Bug 36899: Account for item groups --- .../prog/en/modules/reserve/request.tt | 33 ++++++++++--------- 1 file changed, 17 insertions(+), 16 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 c3eabb5ee3..90041a201a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt @@ -693,21 +693,19 @@ [% biblio_info = biblioloop.0 %] [% IF Koha.Preference('EnableItemGroupHolds') && biblio_info.object.item_groups.count %] -
+
- + [% IF force_hold_level == 'item_group' %] + + (Required) + [% ELSIF force_hold_level == 'item' || force_hold_level == 'record' %] + + [% ELSE %] + + [% END %] +
@@ -1693,14 +1691,17 @@ const fieldset = $(this).find('fieldset:first'); if ( fieldset.hasClass('disabled') ) { - $('.enable_request_specific, .enable_request_any').removeClass('enabled'); + $('.enable_request_specific, .enable_request_any, .enable_request_group').removeClass('enabled'); const specific_cb = $(this).find('#requestspecificitem'); const any_cb = $(this).find('#requestany'); + const itemgroup_cb = $(this).find('#requestgrp'); if ( specific_cb.length ) { specific_cb.prop('checked', true); - } else { + } else if ( any_cb.length ) { any_cb.prop('checked', true); + } else { + itemgroup_cb.prop('checked', true); } fieldset.removeClass('disabled').addClass('enabled'); -- 2.39.2