From b219020bc0d26d9950e4e5220705fea7520fb205 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 Signed-off-by: Martin Renvoize Signed-off-by: Katrin Fischer --- .../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 c7d99f9921..335aa6355f 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 %] +
@@ -1695,14 +1693,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.5