From 7f3775d2d8c5eb18668d4e68e35503e7215b78a9 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 --- .../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 a0ba90ad5de..f63558b8fbe 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 5e7ab30a8ee..6588dc01016 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.45.1