From e616f188663711a612afd467a510eb33ece887f0 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 27 Jun 2019 18:11:51 +0000 Subject: [PATCH] Bug 20959: Style checkin form more like the checkout form, with collapsed settings panel This patch modifies the structure of the checkin form so that settings (Specify return date, book drop mode, forgive overdue charges) are in a collapsed panel when inactive. The style of the barcode field and the mode notification messages has been changed to reduce the vertical motion of the form when selecting options. Some class names have been changed in circulation.tt and circulation.js to make them appropriate for use on both forms. To test, apply the patch and rebuild the staff client CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client). Clear your browser cache if necessary. - View the checkin page. The "checkin settings" panel should be collapsed by default. - Confirm that the settings panel collapses and expands as it should. - Confirm that selecting "Forgive overdue charges" or "Book drop mode" trigger the display of the correct message and that the style of the barcode field is changed. - Confirm that after submitting a barcode for check-in, the settings panel stays open and your selected settings are still selected. - Confirm that specifying a due date and selecting "remember" shows a new message with the selected date. - Confirm that unchecking "remember" hides the message. - Confirm that date settings are remembered and the correct message displayed (or not) during check-in. - Test with CircSidebar enabled and disabled. --- .../intranet-tmpl/prog/css/src/staff-global.scss | 29 +++- .../prog/en/modules/circ/circulation.tt | 16 +- .../intranet-tmpl/prog/en/modules/circ/returns.tt | 180 +++++++++++++-------- .../intranet-tmpl/prog/js/pages/circulation.js | 28 ++-- 4 files changed, 156 insertions(+), 97 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 e188f00583..1eeb84451c 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss @@ -490,11 +490,6 @@ input { } } - &.alert { - background-color: #FFFF99; - border-color: #900; - } - &.hasDatepicker { background-image: url("../img/famfamfam/silk/calendar.png"); background-position-x: right; @@ -523,6 +518,11 @@ input { } } +.input-warning { + background-color: #FF9; + border-color: #900; +} + label, .label { color: #000; @@ -1981,7 +1981,7 @@ i { } } -.checkout-setting { +.circ-setting { font-size: 85%; padding-top: .3em; @@ -1995,7 +1995,7 @@ i { } } -.checkout-settings { +.circ-settings { background-color: #F4F8F9; border-radius: 0; border-top: 2px solid #B9D8D9; @@ -2006,10 +2006,23 @@ i { padding: 1em 1em 0; } -#show-checkout-settings { +#show-circ-settings { margin-top: .5em; } +.checkin-active-setting { + background-color: #FFC; + border-radius: 3px; + box-shadow: 1px 1px 2px 0 rgba(102, 102, 102, .5); + margin: .5em; + padding: .5em; +} + +.form-control-group { + white-space: nowrap; +} + + .blocker { color: #990000; } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt index 41dec3b814..c0cca57eab 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -546,15 +546,15 @@ -
- Checkout settings + -
+
[% UNLESS ( noissues && Koha.Preference('OnSiteCheckoutsForce') ) %] [% IF ( SpecifyDueDate ) %] -
+
Specify due date [% INCLUDE 'date-format.inc' %]:
[% IF ( duedatespec ) %] @@ -573,7 +573,7 @@ [% END %] [% UNLESS ( noissues ) %] -
+
[% IF NEEDSCONFIRMATION %] [% ELSE %] @@ -583,7 +583,7 @@
[% IF Koha.Preference('decreaseLoanHighHolds') %] -
+
[% IF NEEDSCONFIRMATION %] [% IF override_high_holds %] @@ -603,7 +603,7 @@ [% END %] [% IF Koha.Preference('OnSiteCheckouts') %] -
+
[% IF noissues %]
@@ -616,7 +616,7 @@
[% END %] -
+
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt index 46aede9def..a2f6920db8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -669,91 +669,116 @@
[% END%] - - - - -
-
-
- Check in - +
+

Check in

+
+
+
Enter item barcode:
+
+ [% IF ( exemptfine ) %] + + [% ELSIF ( dropboxmode ) %] + + [% ELSE %] + + [% END %] + + [% FOREACH inputloo IN inputloop %] + + + + [% END %] +
+ +
+
[% IF ( exemptfine ) %] - - [% ELSIF ( dropboxmode ) %] - +
[% ELSE %] - + + + [% IF ( forgivemanualholdsexpire ) %] +
+ [% ELSE %] + + + [% IF ( dropboxmode ) %] +
+ [% ELSE %] + + [% IF ( return_date_override_remember ) %] +
+ [% ELSE %] + +
+
+
[% IF Koha.Preference('SpecifyReturnDate') %]
Specify return date [% INCLUDE 'date-format.inc' %]:
- - [% IF ( return_date_override_remember ) %] - - [% ELSE %] - - [% END %] - - -
- [% END %] - [% FOREACH inputloo IN inputloop %] - - - - [% END %] -
+ +
+ [% IF ( return_date_override_remember ) %] + + [% ELSE %] + + [% END %] + +
-
-
- Options + [% END %] [% IF ( CAN_user_updatecharges_writeoff && overduecharges ) %] -

+

[% IF ( exemptfine ) %] [% ELSE %] [% END %] -

+
[% END %] -

+

[% IF ( dropboxmode ) %] [% ELSE %] [% END %] -

+
[% IF Koha.Preference('ExpireReservesMaxPickUpDelayCharge') %] -

+

[% IF ( forgivemanualholdsexpire ) %] [% ELSE %] [% END %] -

+
[% END %] -
-
-
-
+
+ + [% IF ( riloop ) %]

Checked-in items

@@ -809,15 +834,18 @@ [% END %] - [% IF Koha.Preference('CircSidebar') %] -
-
- -
-
- [% END %] + [% IF Koha.Preference('CircSidebar') %] +
+
+ +
+
+ [% ELSE %] +
+
+ [% END %] @@ -828,6 +856,7 @@ [% INCLUDE 'columns_settings.inc' %] [% INCLUDE 'calendar.inc' %] [% Asset.js("lib/jquery/plugins/jquery-ui-timepicker-addon.min.js") | $raw %] + [% Asset.js("js/pages/circulation.js") | $raw %] [% INCLUDE 'timepicker.inc' %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/js/pages/circulation.js b/koha-tmpl/intranet-tmpl/prog/js/pages/circulation.js index 9602550500..84c7f77fe9 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/pages/circulation.js +++ b/koha-tmpl/intranet-tmpl/prog/js/pages/circulation.js @@ -54,26 +54,26 @@ $(document).ready(function() { return false; }); - var checkout_settings = $(".checkout-settings"); - var checkout_settings_icon = $(".checkout-settings-icon"); + var circ_settings = $(".circ-settings"); + var circ_settings_icon = $(".circ-settings-icon"); - // If any checkboxes in the checkout settings are selected, show the settings by default - if ( $(".checkout-settings input:checked,#duedatespec[value!='']").length ) { - checkout_settings.show(); - checkout_settings_icon.removeClass("fa-caret-right").addClass("fa-caret-down"); + // If any checkboxes in the circ settings are selected, show the settings by default + if ( $(".circ-settings input:checked,#duedatespec[value!='']").length ) { + circ_settings.show(); + circ_settings_icon.removeClass("fa-caret-right").addClass("fa-caret-down"); } else { - checkout_settings.hide(); - checkout_settings_icon.removeClass("fa-caret-down").addClass("fa-caret-right"); + circ_settings.hide(); + circ_settings_icon.removeClass("fa-caret-down").addClass("fa-caret-right"); } - $("#show-checkout-settings a").on("click",function(){ - if( checkout_settings.is(":hidden")){ - checkout_settings.show(); - checkout_settings_icon.removeClass("fa-caret-right").addClass("fa-caret-down"); + $("#show-circ-settings a").on("click",function(){ + if( circ_settings.is(":hidden")){ + circ_settings.show(); + circ_settings_icon.removeClass("fa-caret-right").addClass("fa-caret-down"); } else { $("#barcode").focus(); - checkout_settings.hide(); - checkout_settings_icon.removeClass("fa-caret-down").addClass("fa-caret-right"); + circ_settings.hide(); + circ_settings_icon.removeClass("fa-caret-down").addClass("fa-caret-right"); } }); -- 2.11.0