From f9a5a84a1b3e4479f63c709a455b7cf556c4f903 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Tue, 14 May 2024 21:06:52 +0000 Subject: [PATCH] Bug 36864: Add classes/CSS/fix markup on request.tt To test: 1. APPLY PATCH 2. Regenerate CSS ( https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_interface ) 3. Place a hold 4. On reserve/request.pl the 'Hold a specific item' fieldset should be disabled by default. 5. While disabled try clicking on the Allowed pickup locations dropdowns, you should not be able to. 6. In the 'Hold next available item', while enabled, you should be able to interact with the dropdowns. 7. Use the radio buttons to enable the 'Hold a specific item' fieldset. You should now be able to interact with the dropdowns. Signed-off-by: Owen Leonard --- .../prog/css/src/staff-global.scss | 12 ++++ .../prog/en/modules/reserve/request.tt | 62 +++++++++---------- 2 files changed, 41 insertions(+), 33 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 f048744e8f..334cd1e80c 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss @@ -4801,6 +4801,18 @@ div .suggestion_note { } } +#circ_request { + fieldset { + &.disabled { + pointer-events: none; + } + &.rows:has(fieldset.enabled) { + border: 1px solid #408540; + } + } + +} + @import "header"; @import "toolbar"; @import "forms"; 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 7dca1e83ba..f8e506abaa 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt @@ -613,20 +613,18 @@
- + [% IF force_hold_level == 'item' || force_hold_level == 'item_group' %] + + [% ELSIF force_hold_level == 'record' %] + + + (Required) + [% ELSE %] + + [% END %] +
@@ -796,19 +794,17 @@
- + [% IF force_hold_level == 'item' %] + + (Required) + [% ELSIF force_hold_level == 'record' || force_hold_level == 'item_group' %] + + [% ELSE %] + + [% END %] +
@@ -1681,16 +1677,16 @@ function ToggleHoldsToPlace() { if ( $("#requestany").prop('checked') ) { - $(".disable_request_any").prop('disabled',true); - $(".enable_request_any").prop('disabled',false); + $(".disable_request_any").prop('disabled',true).addClass('disabled').removeClass('enabled'); + $(".enable_request_any").prop('disabled',false).removeClass('disabled').addClass('enabled'); $(".requestspecific,.requestgrp").prop('checked', false); } else if( $(".requestspecific").prop('checked') ) { - $(".disable_request_specific").prop('disabled',true); - $(".enable_request_specific").prop('disabled',false); + $(".disable_request_specific").prop('disabled',true).addClass('disabled').removeClass('enabled'); + $(".enable_request_specific").prop('disabled',false).removeClass('disabled').addClass('enabled'); $("#requestany,.requestgrp").prop('checked', false); } else { - $(".disable_request_group").prop('disabled',true); - $(".enable_request_group").prop('disabled',false); + $(".disable_request_group").prop('disabled',true).addClass('disabled').removeClass('enabled'); + $(".enable_request_group").prop('disabled',false).removeClass('disabled').addClass('enabled'); $("#requestany,.requestspecific").prop('checked', false); } } -- 2.39.2