From 2f54850591f589b6a5750f3cff5df846d3e52ee1 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 30 Jul 2019 15:16:26 +0000 Subject: [PATCH] Bug 23039: Hold found modal on checkin screen ( circulation.pl ) obscures Check in message info This patch modifies the checkin process so that any errors or messages related to the current checkin are displayed in any hold/transit modal which is displayed. This prevents any information from being hidden by the modal. This patch also adds an "information" button to the checkout form which the user can click to redisplay the last modal which was dismissed (unless confirming the modal reloads the page). 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). - Test the checkin process with various types of items: - Item not checked out - Item not checked out, on hold - Item not checked out, needs to be transferred - Item is marked lost, needs to be transferred - Item checked out, patron has waiting holds (with WaitingNotifyAtCheckin enabled) - Item checked out, patron has outstanding fines (with FineNotifyAtCheckin enabled) - Test that the modal redisplay button works in cases where the modal is dismissed without triggering a page reload: - Hold confirmation -> Ignore - Transfer confirmation -> OK Signed-off-by: Nick Clemens Signed-off-by: Bouzid Fergani Signed-off-by: Kyle M Hall Signed-off-by: Martin Renvoize --- .../prog/css/src/staff-global.scss | 32 + .../prog/en/modules/circ/returns.tt | 556 +++++++++--------- 2 files changed, 314 insertions(+), 274 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 60ced2786b..9b02c870a1 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss @@ -2163,6 +2163,38 @@ li { } .modal-dialog { + .dialog { + border-radius: 0; + border-width: 1px 0 0 0; + margin: 15px -15px -15px -15px; + padding: 15px; + text-align: left; + width: unset; + + h3 { + margin: unset; + text-align: left; + } + + &.alert { + background: #FFFADE none; + border-color: #E0C726; + + .problem { + background-color: transparent; + } + } + + &.message { + background: #E8EDF6 none; + border-color: #A4BEDD; + + .problem { + background-color: transparent; + } + } + } + &.modal-wide { width: 80%; } 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 2f5493b6f2..97680722b7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -56,135 +56,241 @@
[% END %] - [% IF hold_auto_filled %] + [% BLOCK all_checkin_messages %] + [% IF hold_auto_filled %] +
+ [% IF ( reservenotes ) %] +

Notes: [% reservenotes | html %]

+ [% END %] +

Hold filled for:

+
    +
  • + [% INCLUDE 'patron-title.inc' patron=patron %] + - [% patron.category.description | html %] +
  • -
- [% IF ( diffbranch ) %] -

Transfer to: [% Branches.GetName( destbranch ) | html %]

+

+ [% END %] + [% IF ( errmsgloo.badbarcode ) %] +

No item with barcode: [% errmsgloo.msg | html %]

+ [% END %] + [% IF ( errmsgloo.ispermanent ) %] +

Please return item to: [% Branches.GetName( errmsgloo.msg ) | html %]

+ [% END %] + [% IF ( errmsgloo.notissued ) %] +

Not checked out.

+ [% END %] + [% IF ( errmsgloo.localuse) %] +

Local use recorded

+ [% END %] + [% IF ( errmsgloo.waslost ) %] + [% IF Koha.Preference('BlockReturnOfLostItems') %] +

Item is lost, cannot be checked in.

[% ELSE %] -

Hold at [% Branches.GetName( destbranch ) | html %]

+

Item was lost, now found.

[% END %] -
- -
- - - [% END # /IF hold_auto_filled %] - - - [% IF privacy == 2 AND NOT Koha.Preference('AnonymousPatron') %] -
- Error: - This patron has requested their circulation history be anonymized on check-in, but the AnonymousPatron system preference is empty or incorrect. -
- [% ELSIF NOT Koha.Preference('AnonymousPatron') AND Koha.Preference('OPACPrivacy') %] -
- Error: - The system preference OPACPrivacy is set but AnonymousPatron is not! Please correct this before continuing circulation. -
- [% END %] - - [% IF additional_materials %] -
- Note about the accompanying materials:
- [% additional_materials | html %] -
- [% END %] - - [% IF ( collectionItemNeedsTransferred ) %] -
-

Please transfer item to: [% Branches.GetName( collectionBranch ) | html %]

-

[% itembarcode | html %]: [% title | html %]

-

This item is part of a rotating collection.

-

-
- [% END %] - - - [% IF ( issue.note) %] -
-

Patron note

-

[% issue.notedate | $KohaDates %]

-

[% title | html %] [% author | html %]

-

[% issue.note | html %]

-
- [% END %] - - - [% IF ( fines ) %] -
-

Patron has outstanding fines of [% fines | html %].

-

Make payment.

-
- [% END %] - - - [% IF ( waiting_holds ) %] -
-

[% holdsfirstname | html %] [% holdssurname | html %] has [% waiting_holds | html %] hold(s) waiting for pickup.

-

Check out to this patron.

-
- [% END %] + [% IF LostItemFeeRefunded and not Koha.Preference('BlockReturnOfLostItems') %] +

A refund has been applied to the borrowing patron's account.

+ [% ELSIF Koha.Preference('BlockReturnOfLostItems') %] +
Cannot check in
+

NOT CHECKED IN

+ [% ELSE %] +

Any lost item fees for this item will remain on the patron's account.

+ [% END %] + [% END %] + [% IF ( errmsgloo.withdrawn ) %] + [% IF Koha.Preference('BlockReturnOfWithdrawnItems') %] +
Cannot check in
+

NOT CHECKED IN

+ [% END %] +

Item is withdrawn.

+ [% END %] + [% IF ( errmsgloo.debarred ) %] +

[% errmsgloo.debarname | html %]([% errmsgloo.debarcardnumber | html %]) is now debarred until [% errmsgloo.debarred | $KohaDates %].

+ [% END %] + [% IF ( errmsgloo.prevdebarred ) %] +

Reminder: Patron was earlier restricted until [% errmsgloo.prevdebarred | $KohaDates %].

+ [% END %] + [% IF ( errmsgloo.foreverdebarred ) %] +

Reminder: Patron has an indefinite restriction.

+ [% END %] - - [% IF return_date_was_overriden && Borrowers.IsDebarred( borrower ) %] -
-

- - [% patron.firstname | html %] [% patron.surname | html %] - - is restricted. Please verify this patron should still be restricted. -

-
- [% END %] + [% IF errmsgloo.data_corrupted %] +

The item has not been checked in due to a configuration issue in your system. You must ask an administrator to take a look at the about page and search for the "data problems" section

+ [% END %] + [% END # /FOREACH errmsgloo %] + + [% END #/IF errmsgloop %] + + [% IF ( checkinmsg ) %] + [% IF ( checkinmsgtype == 'alert' ) %] +
+ [% ELSE %] +
+ [% END %] +

[% checkinmsg | html_line_break %]

+
+ [% END # /IF checkinmsg %] + [% END # /BLOCK all_checkin_messages %] [% IF wrongbranch %]