From 3b0394af3c73b8831d4846e0e4a4183f34ba2e77 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 30 Oct 2025 14:43:06 +0000 Subject: [PATCH] Bug 41144: Fix markup errors in self checkout and self checkin templates This patch fixes several markup errors in the self checkout and self checkin templates, for example: - Missing
s ( must be inside one) - Stray ending - Missing The patch also makes some changes to bring masthead-sci.inc and masthead-sco.inc in sync, and makes a correction to a tab WRAPPER in sco-main.tt. To test, apply the patch and if necessary enable both self checkout (WebBasedSelfCheck) and self checkin (SelfCheckInModule). - Go to the self-checkout page and log in - View source and copy the markup into the validator: https://validator.w3.org/#validate-by-input - The only error you see should be one about a duplicate ID "langmenu" which is outside the scope of this patch. - Perform the same test with the self checkin page. Sponsored-by: Athens County Public Libraries --- .../bootstrap/en/includes/masthead-sci.inc | 78 +- .../bootstrap/en/includes/masthead-sco.inc | 3 + .../bootstrap/en/modules/sci/sci-main.tt | 38 +- .../bootstrap/en/modules/sco/sco-main.tt | 1129 ++++++++--------- 4 files changed, 628 insertions(+), 620 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead-sci.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead-sci.inc index 7113136a378..3dba36eae53 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead-sci.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead-sci.inc @@ -5,45 +5,47 @@ [% SET OpacLangSelectorMode = Koha.Preference('OpacLangSelectorMode') %] [% SET OpacHeader = AdditionalContents.get( location => "opacheader", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %] -
-
- + - [% IF ( OpacHeader ) %] -
-
-
[% PROCESS koha_news_block news => OpacHeader %]
-
+ [% IF ( OpacHeader ) %] +
+
+
[% PROCESS koha_news_block news => OpacHeader %]
- [% END # /IF opacheader %] -
- -
+ + [% END # /IF opacheader %] + + + +
+ diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead-sco.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead-sco.inc index 44760a8942a..526ac466271 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead-sco.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead-sco.inc @@ -43,3 +43,6 @@ [% END # /IF opacheader %] + +
+ diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sci/sci-main.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sci/sci-main.tt index 098313f0402..db3333f9603 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sci/sci-main.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sci/sci-main.tt @@ -103,8 +103,10 @@ - - + + + + [% FOREACH success_line IN success %] @@ -135,26 +137,30 @@
[% INCLUDE 'csrf-token.inc' %] - Scan -
-
- -
-
- -
-
- +
+ Scan +
+
+ +
+
+ +
+
+ +
-
- + +
- + + + @@ -218,8 +224,6 @@
- - [% INCLUDE 'opac-bottom.inc' %] [% BLOCK jsinclude %] + [% Asset.js("js/holds.js") | $raw %] + [% IF ( Koha.Preference('SCOUserJS') ) %] + - [% Asset.js("js/holds.js") | $raw %] - [% IF ( Koha.Preference('SCOUserJS') ) %] - - [% END %] [% END %] +[% END %] - [% BLOCK display_errors %] - [% FOREACH item IN impossible %] - -
- -

Item cannot be checked out.

-

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

- [% IF ( item.title ) %] -

Title: [% item.title | html %]

- [% END %] +[% BLOCK display_errors %] + [% FOREACH item IN impossible %] + +
+ +

Item cannot be checked out.

+

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

+ [% IF ( item.title ) %] +

Title: [% item.title | html %]

+ [% END %] -

- [% IF ( item.circ_error_UNKNOWN_BARCODE ) %] - The system does not recognize this barcode. - [% ELSIF ( item.circ_error_max_loans_allowed ) %] - You have reached the maximum limit of items checked out. - [% ELSIF ( item.circ_error_ISSUED_TO_ANOTHER ) %] - This item is checked out to someone else. - [% ELSIF ( item.circ_error_NO_MORE_RENEWALS ) %] - You cannot renew this item again. - [% ELSIF ( item.circ_error_NOT_FOR_LOAN ) %] - This item is not for loan. - [% ELSIF ( item.circ_error_DEBT ) %] - You owe the library [% item.DEBT | $Price with_symbol => 1 %] and cannot check out. - [% ELSIF ( item.circ_error_WTHDRAWN ) %] - This item has been withdrawn from the collection. - [% ELSIF ( item.circ_error_RESTRICTED ) %] - This item is restricted. - [% ELSIF ( item.circ_error_RESERVED ) %] - This item is on hold for another patron. - [% ELSIF ( item.circ_error_ITEMNOTSAMEBRANCH ) %] - This item belongs to another library. - [% ELSIF ( item.circ_error_EXPIRED ) %] - Your account has expired. - [% ELSIF ( item.circ_error_DEBARRED ) %] - Your account has been suspended. - [% ELSIF ( item.circ_error_CARD_LOST ) %] - This library card has been declared lost. - [% ELSIF ( item.circ_error_GNA ) %] - Your contact information seems to be incomplete. - [% ELSIF ( item.circ_error_INVALID_DATE ) %] - Due date is not valid. - [% ELSIF ( item.circ_error_ADDITIONAL_MATERIALS ) %] - Item must be checked out at a circulation desk. - [% END %] - Please see a member of the library staff. -

- - [% IF ( item.returnitem && Koha.Preference('SCOAllowCheckin') ) %] - - [% INCLUDE 'csrf-token.inc' %] - Return - - - - - - - +

+ [% IF ( item.circ_error_UNKNOWN_BARCODE ) %] + The system does not recognize this barcode. + [% ELSIF ( item.circ_error_max_loans_allowed ) %] + You have reached the maximum limit of items checked out. + [% ELSIF ( item.circ_error_ISSUED_TO_ANOTHER ) %] + This item is checked out to someone else. + [% ELSIF ( item.circ_error_NO_MORE_RENEWALS ) %] + You cannot renew this item again. + [% ELSIF ( item.circ_error_NOT_FOR_LOAN ) %] + This item is not for loan. + [% ELSIF ( item.circ_error_DEBT ) %] + You owe the library [% item.DEBT | $Price with_symbol => 1 %] and cannot check out. + [% ELSIF ( item.circ_error_WTHDRAWN ) %] + This item has been withdrawn from the collection. + [% ELSIF ( item.circ_error_RESTRICTED ) %] + This item is restricted. + [% ELSIF ( item.circ_error_RESERVED ) %] + This item is on hold for another patron. + [% ELSIF ( item.circ_error_ITEMNOTSAMEBRANCH ) %] + This item belongs to another library. + [% ELSIF ( item.circ_error_EXPIRED ) %] + Your account has expired. + [% ELSIF ( item.circ_error_DEBARRED ) %] + Your account has been suspended. + [% ELSIF ( item.circ_error_CARD_LOST ) %] + This library card has been declared lost. + [% ELSIF ( item.circ_error_GNA ) %] + Your contact information seems to be incomplete. + [% ELSIF ( item.circ_error_INVALID_DATE ) %] + Due date is not valid. + [% ELSIF ( item.circ_error_ADDITIONAL_MATERIALS ) %] + Item must be checked out at a circulation desk. [% END %] - -

- Error - + Please see a member of the library staff. +

+ + [% IF ( item.returnitem && Koha.Preference('SCOAllowCheckin') ) %] + + [% INCLUDE 'csrf-token.inc' %] + Return + - +
-
- - [% END # / FOREACH impossible %] - - [% FOREACH c IN confirm %] - -

Please confirm the checkout:

- - [% IF ( c.confirm_renew_issue ) %] -

This item is already checked out to you: [% c.confirm | html %] ([% c.barcode | html %])

- [% END %] + [% END %] - [% IF ( c.renew && Koha.Preference('SCOAllowCheckin') ) %] -
- [% INCLUDE 'csrf-token.inc' %] - Return - - - - - - - -
- [% END %] +
+ Error + + + + + + +
+
+ + [% END # / FOREACH impossible %] + + [% FOREACH c IN confirm %] + +

Please confirm the checkout:

+ + [% IF ( c.confirm_renew_issue ) %] +

This item is already checked out to you: [% c.confirm | html %] ([% c.barcode | html %])

+ [% END %] - [% UNLESS ( c.renew ) %] -
- [% INCLUDE 'csrf-token.inc' %] - Renew - - - - - - - -
- [% ELSE %] -
- [% INCLUDE 'csrf-token.inc' %] - Renew - - - - - - - -
- [% END %] + [% IF ( c.renew && Koha.Preference('SCOAllowCheckin') ) %] +
+ [% INCLUDE 'csrf-token.inc' %] + Return + + + + + + + +
+ [% END %] -
- Cancel - + [% UNLESS ( c.renew ) %] + + [% INCLUDE 'csrf-token.inc' %] + Renew + + + - +
-
- [% END # / FOREACH confirm %] - - [% IF ( nopermission ) %] - -
- -

Access denied

-

Sorry, this self-checkout station has lost authentication. Please contact the administrator to resolve this problem.

-
- [% END %] + [% ELSE %] +
+ [% INCLUDE 'csrf-token.inc' %] + Renew + + + + + + + +
+ [% END %] - [% IF ( different_ip ) %] - -
- -

Session lost

-

You are accessing self-checkout from a different IP address! please log in again.

-
- [% END %] +
+ Cancel + + + + + +
+
+ [% END # / FOREACH confirm %] + + [% IF ( nopermission ) %] + +
+ +

Access denied

+

Sorry, this self-checkout station has lost authentication. Please contact the administrator to resolve this problem.

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

Record not found

-

Your userid was not found in the database. Please try again.

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

Session lost

+

You are accessing self-checkout from a different IP address! please log in again.

+
+ [% END %] - [% IF ( issued ) %] - [% IF batch_checkouts_allowed %] - [% FOREACH barcode IN newissues.split(',') %] - -
-

Item checked out ([% barcode | html %])

-
- [% END %] - [% ELSE %] + [% IF ( invalid_username_or_password ) %] + +
+ +

Record not found

+

Your userid was not found in the database. Please try again.

+
+ [% END %] + + [% IF ( issued ) %] + [% IF batch_checkouts_allowed %] + [% FOREACH barcode IN newissues.split(',') %]
-

Item checked out ([% newissues.split(',').last | html %])

+

Item checked out ([% barcode | html %])

[% END %] - [% ELSIF ( renewed ) %] - -
-

Item renewed ([% barcode | html %])

-
- [% ELSIF ( renewed == 0) %] - -
-

Item not renewed

-
- [% ELSIF ( returned == 0 ) %] - -
-

Item not checked in: please see circulation staff for assistance

-
- [% ELSIF ( returned == 1 ) %] - + [% ELSE %] +
-

Item checked in ([% barcode | html %])

+

Item checked out ([% newissues.split(',').last | html %])

[% END %] + [% ELSIF ( renewed ) %] + +
+

Item renewed ([% barcode | html %])

+
+ [% ELSIF ( renewed == 0) %] + +
+

Item not renewed

+
+ [% ELSIF ( returned == 0 ) %] + +
+

Item not checked in: please see circulation staff for assistance

+
+ [% ELSIF ( returned == 1 ) %] + +
+

Item checked in ([% barcode | html %])

+
[% END %] -
+[% END %] -- 2.39.5