From dcb22f70ccbddb3e3632ab167ca8f1c41f972775 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 6 Nov 2012 11:14:44 -0500 Subject: [PATCH] Bug 8955 [Follow-up] Self checkout should degrade gracefully w/o JavaScript Content-Type: text/plain; charset="utf-8" This follow-up fixes some instance of unnecessary JavaScript which I missed the first time around: The renew and check-in buttons on the list of checkouts. The functionality can be easily accomplished without JS. Also corrected: - Capitalization error - Miss-named variable causing the "too many checkouts" not to be displayed - Misplaced [% END %] tags hidding "Return to account" button on some dialogs. - Corrected variable scope error which prevented the "return" button from appearing. To test, log into self checkout using an account which has checkouts. Testing renewing items both by scanning barcodes and by clicking the "renew" button in the list of checkouts. Renew something until it reaches its limit and test checking it out by scanning the barcode. Test the "check in" button. --- .../opac-tmpl/prog/en/modules/sco/sco-main.tt | 24 +++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/sco/sco-main.tt b/koha-tmpl/opac-tmpl/prog/en/modules/sco/sco-main.tt index 785451f..72aa333 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/sco/sco-main.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/sco/sco-main.tt @@ -101,12 +101,12 @@ $(document).ready(function() {
[% IF ( impossible ) %] -

Item cannot be checked out.

Sorry, This item cannot be checked out at this station.

+

Item cannot be checked out.

Sorry, this item cannot be checked out at this station.

[% IF ( title ) %]

Title: [% title |html %]

[% END %]

[% IF ( circ_error_UNKNOWN_BARCODE ) %] MESSAGE 1: The system does not recognize this barcode. - [% ELSIF ( circ_error_TOO_MANY ) %] + [% ELSIF ( circ_error_max_loans_allowed ) %] MESSAGE 2: You have checked out too many items and can't check out any more. [% ELSIF ( circ_error_ISSUED_TO_ANOTHER ) %] MESSAGE 3: This item is checked out to someone else. @@ -145,6 +145,8 @@ $(document).ready(function() { +[% END %] +[% END %]

@@ -152,8 +154,6 @@ $(document).ready(function() {
[% END %] -[% END %] -[% END %] [% IF ( confirm ) %]

Please confirm the checkout:

[% IF ( confirm_renew_issue ) %]This item is already checked out to you.[% END %]

@@ -263,19 +263,21 @@ Sorry, this self-checkout station has lost authentication. Please contact the a [% IF ( ISSUE.overdue ) %][% ISSUE.date_due | $KohaDates %][% ELSE %][% ISSUE.date_due | $KohaDates %][% END %]
- - [% IF ( ISSUE.norenew ) %] - [% IF ( ISSUE.AllowSelfCheckReturns ) %] - + [% IF ( AllowSelfCheckReturns ) %] + + + [% ELSE %] - No renewals allowed + No renewals allowed [% END %] [% ELSE %] - [% UNLESS ( ISSUE.renew ) %] - [% ELSE %][% END %] + + + [% UNLESS ( ISSUE.renew ) %] + [% ELSE %][% END %] [% END %]
-- 1.7.9.5