Bugzilla – Attachment 191715 Details for
Bug 41144
Fix markup errors in self checkout and self checkin templates
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41144: Fix markup errors in self checkout and self checkin templates
Bug-41144-Fix-markup-errors-in-self-checkout-and-s.patch (text/plain), 18.42 KB, created by
Owen Leonard
on 2026-01-20 17:43:00 UTC
(
hide
)
Description:
Bug 41144: Fix markup errors in self checkout and self checkin templates
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2026-01-20 17:43:00 UTC
Size:
18.42 KB
patch
obsolete
>From 725536726a14e0647e75b63d439e5b5646c639c4 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 20 Jan 2026 12:13:47 -0500 >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 <fieldset>s (<legend> must be inside one) >- Stray ending </div> >- Missing <tr> > >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. > >Unrelated: Minor markup changes to langmenu.inc in order to fix HTML >validation errors. > >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 >- Perform the same test with the self checkin page. > >Sponsored-by: Athens County Public Libraries >--- > .../bootstrap/en/includes/langmenu.inc | 8 ++-- > .../bootstrap/en/includes/masthead-sci.inc | 21 ++++++---- > .../bootstrap/en/includes/masthead-sco.inc | 11 +++++- > .../bootstrap/en/modules/sci/sci-main.tt | 38 ++++++++++--------- > .../bootstrap/en/modules/sco/sco-main.tt | 34 ++++++++--------- > 5 files changed, 65 insertions(+), 47 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/langmenu.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/langmenu.inc >index 187c886974c..6e9001a7c4f 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/langmenu.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/langmenu.inc >@@ -6,9 +6,9 @@ > [% SET menu_id = 'header_langmenu' %] > [% END %] > <div id="[% menu_id | html %]" class="langmenu"> >- <ul class="navbar-nav"> >+ <ul class="navbar-nav" role="menu"> > <li class="[% li_class | html %]"> >- <a href="#" title="Switch languages" class="nav-link dropdown-toggle" id="langmenu" data-bs-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" >+ <a href="#" title="Switch languages" class="nav-link dropdown-toggle" id="[% menu_id | html %]_dropdown" data-bs-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" > ><i class="fa fa-flag fa-fw fa-icon-[% context | html %]" aria-hidden="true"></i> <span class="langlabel">Languages</span> <b class="caret"></b > ></a> > [% IF ( context == "footer" ) -%] >@@ -16,7 +16,7 @@ > [% ELSE %] > [% SET div_class = 'dropdown-menu dropdown-menu-end' %] > [% END %] >- <div aria-labelledby="langmenu" role="menu" class="[% div_class | html %]"> >+ <div aria-labelledby="[% menu_id | html %]_dropdown" role="menu" class="[% div_class | html %]"> > [% FOREACH languages_loo IN languages_loop %] > [% IF ( languages_loo.group_enabled ) %] > [% IF ( languages_loo.plural ) %] >@@ -62,7 +62,7 @@ > <!-- /# .dropdown-menu --> > </li> > <!-- / .dropdown --> >- <li class="divider-vertical" aria-hidden="false" role="presentation"></li> >+ <li class="divider-vertical" aria-hidden="false" role="separator"></li> > </ul> > <!-- /.navbar-nav --> > </div> >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..d5868c1497b 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead-sci.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead-sci.inc >@@ -5,10 +5,13 @@ > [% SET OpacLangSelectorMode = Koha.Preference('OpacLangSelectorMode') %] > [% SET OpacHeader = AdditionalContents.get( location => "opacheader", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %] > >+<!-- prettier-ignore-start --> >+<!-- closed in opac-bottom.inc --> > <div id="wrapper"> >+<!-- prettier-ignore-end --> > <header id="header-region" class="noprint"> > <nav class="navbar navbar-expand"> >- <h1 id="logo"> >+ <div id="logo"> > <a class="navbar-brand" href="/cgi-bin/koha/sci/sci-main.pl"> > [% IF ( LibraryNameTitle ) %] > [% LibraryNameTitle | html %] >@@ -16,12 +19,14 @@ > Koha online > [% END %] > </a> >- </h1> >+ </div> >+ >+ [% IF ( Koha.Preference( 'opaclanguagesdisplay' ) && ( ! one_language_enabled ) && ( languages_loop ) && ( OpacLangSelectorMode == 'both' || OpacLangSelectorMode == 'top') ) %] >+ [% context = "header" %] >+ [% INCLUDE 'langmenu.inc' %] >+ [% END %] > >- <ul class="navbar-nav ml-auto"> >- [% IF ( Koha.Preference( 'opaclanguagesdisplay' ) ) %] >- <li class="nav-item"> [% INCLUDE 'langmenu.inc' %] </li> >- [% END # / IF opaclanguagedisplay %] >+ <ul class="navbar-nav ml-auto"> > > <li class="nav-item"> > <ul class="navbar-nav"> >@@ -46,4 +51,6 @@ > [% END # /IF opacheader %] > </header> > <!-- /navbar --> >-</div> >+<!-- prettier-ignore-start --> >+ <div id="wrapper"><!-- / closed in opac-bottom.inc --> >+<!-- prettier-ignore-end --> >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 624dcc4b196..5bacc2df1a3 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead-sco.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead-sco.inc >@@ -5,9 +5,13 @@ > [% SET OpacLangSelectorMode = Koha.Preference('OpacLangSelectorMode') %] > [% SET OpacHeader = AdditionalContents.get( location => "opacheader", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %] > >+<!-- prettier-ignore-start --> >+<!-- closed in opac-bottom.inc --> >+<div id="wrapper"> >+<!-- prettier-ignore-end --> > <header id="header-region" class="noprint"> > <nav class="navbar navbar-expand"> >- <h1 id="logo"> >+ <div id="logo"> > <a class="navbar-brand" href="/cgi-bin/koha/sco/sco-main.pl"> > [% IF ( LibraryNameTitle ) %] > [% LibraryNameTitle | html %] >@@ -15,7 +19,7 @@ > Koha online > [% END %] > </a> >- </h1> >+ </div> > > <ul class="navbar-nav ml-auto"> > [% IF ( Koha.Preference( 'opaclanguagesdisplay' ) ) %] >@@ -42,3 +46,6 @@ > [% END # /IF opacheader %] > </header> > <!-- /navbar --> >+<!-- prettier-ignore-start --> >+ <div id="wrapper"><!-- / closed in opac-bottom.inc --> >+<!-- prettier-ignore-end --> >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 @@ > <table id="sci_bcheckins_table" class="table table-bordered table-striped dataTable no-footer"> > <caption><h2>Results</h2></caption> > <thead> >- <th>Barcode</th> >- <th>Status</th> >+ <tr> >+ <th>Barcode</th> >+ <th>Status</th> >+ </tr> > </thead> > <tbody> > [% FOREACH success_line IN success %] >@@ -135,26 +137,30 @@ > <div id="new_checkins" class="sci_entry"> > <form id="scan_form" name="scan_form" method="post" action="/cgi-bin/koha/sci/sci-main.pl"> > [% INCLUDE 'csrf-token.inc' %] >- <legend class="sr-only">Scan</legend> >- <div class="row"> >- <div class="col-auto"> >- <label for="barcode_input">Scan the item or enter its barcode:</label> >- </div> >- <div class="col-4"> >- <input id="barcode_input" name="barcode_input" size="20" type="text" class="focus form-control" autocomplete="off" /> >- </div> >- <div class="col-auto"> >- <button id="sci_append_button" type="submit" class="btn btn-primary"> Submit </button> >+ <fieldset class="mb-3"> >+ <legend class="sr-only">Scan</legend> >+ <div class="row"> >+ <div class="col-auto"> >+ <label for="barcode_input">Scan the item or enter its barcode:</label> >+ </div> >+ <div class="col-4"> >+ <input id="barcode_input" name="barcode_input" size="20" type="text" class="focus form-control" autocomplete="off" /> >+ </div> >+ <div class="col-auto"> >+ <button id="sci_append_button" type="submit" class="btn btn-primary"> Submit </button> >+ </div> > </div> >- </div> >- <!-- /.row --> >+ <!-- /.row --> >+ </fieldset> > <div class="row"> > <div class="col"> > <div class="sci_input_append"> > <table id="sci_barcodes_table" class="table table-bordered table-striped dataTable no-footer" style="display: none;"> > <caption class="sr-only">Barcodes</caption> > <thead> >- <th class="barcodes_column">Barcode</th> >+ <tr> >+ <th class="barcodes_column">Barcode</th> >+ </tr> > </thead> > <tbody> </tbody> > </table> >@@ -218,8 +224,6 @@ > </div> > <!-- /#helpModal --> > >-</body> >- > [% INCLUDE 'opac-bottom.inc' %] > [% BLOCK jsinclude %] > <script> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt >index ad3dc1ab1bf..a5f33e1e500 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt >@@ -57,7 +57,7 @@ > [% Asset.js('js/i18n.js') | $raw %] > </head> > <body id="sco_main" class="sco"> >-<div id="wrapper"> >+ > [% INCLUDE 'masthead-sco.inc' %] > > <main class="main"> >@@ -85,15 +85,16 @@ > <div id="newcheckout" class="sco_entry"> > <form id="scan_form" name="scan_form" method="post" action="/cgi-bin/koha/sco/sco-main.pl"> > [% INCLUDE 'csrf-token.inc' %] >- <legend >- ><h2> >- [% IF ( Koha.Preference('SCOAllowCheckin') ) %] >- <span>Check out, return, or renew an item:</span> >- [% ELSE %] >- <span>Check out or renew an item:</span> >- [% END %] >- </h2></legend >- > >+ <fieldset class="mb-3"> >+ <legend> >+ <h2> >+ [% IF ( Koha.Preference('SCOAllowCheckin') ) %] >+ <span>Check out, return, or renew an item:</span> >+ [% ELSE %] >+ <span>Check out or renew an item:</span> >+ [% END %] >+ </h2> >+ </legend> > <div class="row"> > <div class="col"> > <label for="barcode">Scan a new item or enter its barcode[% IF batch_checkouts_allowed %](or for <b>multiple checkouts only,</b> enter a barcode list, one barcode per line)[% END %]:</label> >@@ -117,6 +118,7 @@ > </div> > </div> > <!-- /.row --> >+ </fieldset> > </form> > <!-- /#scan_form --> > </div> >@@ -130,13 +132,10 @@ > [% END %] > </div> > <!-- / .row --> >- </div> >- <!-- / .container-fluid --> > >- <div class="container-fluid"> > <div class="row"> > <div class="col order-first order-md-first order-lg-2"> >- [% WRAPPER tabs %] >+ [% WRAPPER tabs id="checkouts" %] > [% WRAPPER tabs_nav %] > [% WRAPPER tab_item tabname= "checkouts" bt_active= 1 %] > <span>Checkouts ([% issues_count | html %])</span> >@@ -154,7 +153,6 @@ > > [% WRAPPER tab_panels %] > [% WRAPPER tab_panel tabname="checkouts" bt_active= 1 %] >- <div id="checkouts-tab" class="tab-pane show active" aria-labelledby="checkouts"> > <div id="borrowerdetails"> > [% IF ( new_issue ) %] > <div class="lastchecked"> >@@ -215,6 +213,7 @@ > <td> > <form action="/cgi-bin/koha/sco/sco-main.pl" method="post"> > [% INCLUDE 'csrf-token.inc' %] >+ <fieldset> > <legend class="sr-only">Issue renews</legend> > <input type="hidden" name="patronid" value="[% patronid | html %]" /> > <input type="hidden" name="load_checkouts" value="[% load_checkouts | html %]" /> >@@ -242,12 +241,14 @@ > [% IF ISSUE.auto_renew %] > <br /><span>This item is scheduled for automatic renewal</span> > [% END %] >+ </fieldset> > </form> > </td> > [% IF Koha.Preference('SCOAllowCheckin') %] > <td> > <form action="/cgi-bin/koha/sco/sco-main.pl" method="post"> > [% INCLUDE 'csrf-token.inc' %] >+ <fieldset> > <legend class="sr-only">Issue renews</legend> > <input type="hidden" name="patronid" value="[% patronid | html %]" /> > <input type="hidden" name="load_checkouts" value="[% load_checkouts | html %]" /> >@@ -255,6 +256,7 @@ > <input type="submit" value="Check in item" name="confirm" class="btn btn-info btn-sm return" /> > <input type="hidden" name="op" value="cud-returnbook" /> > <input type="hidden" name="confirmed" value="" /> >+ </fieldset> > </form> > </td> > [% END %] >@@ -274,7 +276,6 @@ > [% END # / IF issues_count %] > </div> > <!-- / #borrowerdetails --> >- </div> > [% END # /tab_panel %] > [% WRAPPER tab_panel tabname="holds" %] > [% IF HOLDS.count > 0 %] >@@ -727,4 +728,3 @@ > </div> > [% END %] > [% END %] >-</div> >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 41144
:
188665
|
190315
|
190320
| 191715 |
191716