From 924077e4c39b8028b8484a2c27b35b7e51920589 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Mon, 20 May 2024 15:55:11 +0000 Subject: [PATCH] Bug 36899: Make entire fieldset clickable To test: 1. APPLY PATCH 2. Regenerate CSS ( https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_interface ) 3. Follow the test plan from bug 36864 4. Now the entire disabled fieldset should be clickable. 5. When the disabled fieldset is clicked from anywhere with it the fieldset should become enabled. The other one should then be disabled. Signed-off-by: David Nind Signed-off-by: Martin Renvoize Signed-off-by: Katrin Fischer --- .../prog/css/src/staff-global.scss | 3 +++ .../prog/en/modules/reserve/request.tt | 23 +++++++++++++++++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss index a0ba90ad5d..f63558b8fb 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss @@ -4802,6 +4802,9 @@ div .suggestion_note { } #circ_request { + fieldset:has(fieldset.disabled) { + cursor: pointer; + } fieldset { position: relative; &.disabled { 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 5e7ab30a8e..6588dc0101 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt @@ -611,7 +611,7 @@ -
+
[% IF force_hold_level == 'item' || force_hold_level == 'item_group' %] @@ -792,7 +792,7 @@ [% END %] -
+
[% IF force_hold_level == 'item' %] @@ -1691,6 +1691,25 @@ } } + $('.any_specific').click(function() { + const fieldset = $(this).find('fieldset:first'); + $('.enable_request_specific, .enable_request_any').removeClass('enabled'); + + if ( fieldset.hasClass('disabled') ) { + const specific_cb = $(this).find('#requestspecificitem'); + const any_cb = $(this).find('#requestany'); + + if ( specific_cb.length ) { + specific_cb.prop('checked', true); + } else { + any_cb.prop('checked', true); + } + + fieldset.removeClass('disabled').addClass('enabled'); + ToggleHoldsToPlace(); + } + }); + function check( e, table ) { var msg = ""; -- 2.39.5