Bugzilla – Attachment 188665 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), 90.31 KB, created by
Owen Leonard
on 2025-10-30 15:43:52 UTC
(
hide
)
Description:
Bug 41144: Fix markup errors in self checkout and self checkin templates
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2025-10-30 15:43:52 UTC
Size:
90.31 KB
patch
obsolete
>From 3b0394af3c73b8831d4846e0e4a4183f34ba2e77 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >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 <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. > >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 ) %] > >-<div id="wrapper"> >- <header id="header-region" class="noprint"> >- <nav class="navbar navbar-expand"> >- <h1 id="logo"> >- <a class="navbar-brand" href="/cgi-bin/koha/sci/sci-main.pl"> >- [% IF ( LibraryNameTitle ) %] >- [% LibraryNameTitle | html %] >- [% ELSE %] >- Koha online >- [% END %] >- </a> >- </h1> >+<header id="header-region" class="noprint"> >+ <nav class="navbar navbar-expand"> >+ <div id="logo"> >+ <a class="navbar-brand" href="/cgi-bin/koha/sci/sci-main.pl"> >+ [% IF ( LibraryNameTitle ) %] >+ [% LibraryNameTitle | html %] >+ [% ELSE %] >+ Koha online >+ [% END %] >+ </a> >+ </div> > >- <ul class="navbar-nav ml-auto"> >- [% IF ( Koha.Preference( 'opaclanguagesdisplay' ) ) %] >- <li class="nav-item"> [% INCLUDE 'langmenu.inc' %] </li> >- [% END # / IF opaclanguagedisplay %] >+ [% IF ( Koha.Preference( 'opaclanguagesdisplay' ) && ( ! one_language_enabled ) && ( languages_loop ) && ( OpacLangSelectorMode == 'both' || OpacLangSelectorMode == 'top') ) %] >+ [% context = "header" %] >+ [% INCLUDE 'langmenu.inc' %] >+ [% END %] > >- <li class="nav-item"> >- <ul class="navbar-nav"> >- <li class="nav-item"> >- <a href="/cgi-bin/koha/sci/sci-main.pl" class="nav-link helpModal-trigger" role="button" data-bs-toggle="modal"><i class="fa fa-info-circle fa-icon-black" aria-hidden="true"></i> Help</a> >- </li> >- </ul> >- </li> >- <li class="nav-item"> >- <a id="sci_logout" href="/cgi-bin/koha/sci/sci-main.pl?logout.x=1" class="nav-link logout"> <i class="fa-solid fa-right-from-bracket" aria-hidden="true"></i> Log out </a> >- </li> >- </ul> >- </nav> >- <!-- /navbar --> >+ <ul class="navbar-nav ml-auto"> >+ <li class="nav-item"> >+ <ul class="navbar-nav"> >+ <li class="nav-item"> >+ <a href="/cgi-bin/koha/sci/sci-main.pl" class="nav-link helpModal-trigger" role="button" data-bs-toggle="modal"><i class="fa fa-info-circle fa-icon-black" aria-hidden="true"></i> Help</a> >+ </li> >+ </ul> >+ </li> >+ <li class="nav-item"> >+ <a id="sci_logout" href="/cgi-bin/koha/sci/sci-main.pl?logout.x=1" class="nav-link logout"> <i class="fa-solid fa-right-from-bracket" aria-hidden="true"></i> Log out </a> >+ </li> >+ </ul> >+ </nav> >+ <!-- /navbar --> > >- [% IF ( OpacHeader ) %] >- <div class="container-fluid"> >- <div class="row"> >- <div class="col"> [% PROCESS koha_news_block news => OpacHeader %] </div> >- </div> >+ [% IF ( OpacHeader ) %] >+ <div class="container-fluid"> >+ <div class="row"> >+ <div class="col"> [% PROCESS koha_news_block news => OpacHeader %] </div> > </div> >- [% END # /IF opacheader %] >- </header> >- <!-- /navbar --> >-</div> >+ </div> >+ [% 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/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 %] > </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 83a67b13765..e9e7c6b69ea 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 >@@ -24,43 +24,43 @@ > [% END %] > </head> > <body id="sco_main" class="sco"> >-<div id="wrapper"> >- [% INCLUDE 'masthead-sco.inc' %] >+[% INCLUDE 'masthead-sco.inc' %] > >- <main class="main"> >- [% IF ( display_patron_image ) %] >- [% SET main_div_class = 'col-10 order-first order-md-first order-lg-2' %] >- [% ELSE %] >- [% SET main_div_class = 'col order-first order-md-first order-lg-2' %] >- [% END %] >+<main class="main"> >+ [% IF ( display_patron_image ) %] >+ [% SET main_div_class = 'col-10 order-first order-md-first order-lg-2' %] >+ [% ELSE %] >+ [% SET main_div_class = 'col order-first order-md-first order-lg-2' %] >+ [% END %] >+ >+ [% UNLESS ( hide_main ) %] >+ [% IF ( validuser ) %] >+ <div class="container-fluid"> >+ <div class="row"> >+ <div class="[% main_div_class | html %]"> >+ <div id="masthead"><h1>[% LibraryName | html %] Self-checkout system</h1></div> >+ >+ [% PROCESS display_errors %] > >- [% UNLESS ( hide_main ) %] >- [% IF ( validuser ) %] >- <div class="container-fluid"> >- <div class="row"> >- <div class="[% main_div_class | html %]"> >- <div id="masthead"><h1>[% LibraryName | html %] Self-checkout system</h1></div> >- >- [% PROCESS display_errors %] >- >- <div class="alert alert-info">You are logged in as [% borrowername | html %].</div> >- [% INCLUDE 'opac-note.inc' sco="true" %] >- [% IF patron_has_hold_fee %] >- <div class="alert alert-warning">A hold fee was charged to your account for collecting this item.</div> >- [% END %] >- >- <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> >+ <div class="alert alert-info">You are logged in as [% borrowername | html %].</div> >+ [% INCLUDE 'opac-note.inc' sco="true" %] >+ [% IF patron_has_hold_fee %] >+ <div class="alert alert-warning">A hold fee was charged to your account for collecting this item.</div> >+ [% END %] >+ >+ <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' %] >+ <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 >- > >+ </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> >@@ -84,269 +84,188 @@ > </div> > </div> > <!-- /.row --> >- </form> >- <!-- /#scan_form --> >- </div> >- <!-- / #newcheckout --> >+ </fieldset> >+ </form> >+ <!-- /#scan_form --> > </div> >- <!-- / .span12/12 --> >- [% IF ( display_patron_image ) %] >- <div class="col-lg-2"> >- <img src="/cgi-bin/koha/sco/sco-patron-image.pl" alt="" /> >- </div> >- [% END %] >+ <!-- / #newcheckout --> > </div> >- <!-- / .row --> >+ <!-- / .span12/12 --> >+ [% IF ( display_patron_image ) %] >+ <div class="col-lg-2"> >+ <img src="/cgi-bin/koha/sco/sco-patron-image.pl" alt="" /> >+ </div> >+ [% END %] > </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_nav %] >- [% WRAPPER tab_item tabname= "checkouts" bt_active= 1 %] >- <span>Checkouts ([% issues_count | html %])</span> >+ <!-- / .row --> >+ >+ <div class="row"> >+ <div class="col order-first order-md-first order-lg-2"> >+ [% WRAPPER tabs id="checkouts" %] >+ [% WRAPPER tabs_nav %] >+ [% WRAPPER tab_item tabname= "checkouts" bt_active= 1 %] >+ <span>Checkouts ([% issues_count | html %])</span> >+ [% END %] >+ [% WRAPPER tab_item tabname= "holds" %] >+ [% IF waiting_holds_count %] >+ <i class="fa fa-exclamation-circle" aria-hidden="true"></i> > [% END %] >- [% WRAPPER tab_item tabname= "holds" %] >- [% IF waiting_holds_count %] >- <i class="fa fa-exclamation-circle" aria-hidden="true"></i> >+ <span>Holds</span> ([% HOLDS.count | html %]) >+ [% END %] >+ [% WRAPPER tab_item tabname= "account" %] >+ <span>Charges ([% total | $Price %])</span> >+ [% END %] >+ [% END # /WRAPPER tabs_nav %] >+ >+ [% WRAPPER tab_panels %] >+ [% WRAPPER tab_panel tabname="checkouts" bt_active= 1 %] >+ <div id="borrowerdetails"> >+ [% IF ( new_issue ) %] >+ <div class="lastchecked"> >+ <p> >+ <strong>Checked out: </strong> >+ [% new_issue.item.biblio.title | html %] ([% new_issue.item.barcode | html %]). >+ [% IF new_issue.item.is_bundle %] >+ [% SET bundle_items_count = new_issue.item.bundle_items.count %] >+ [% tnx('Bundle of {count} item', 'Bundle of {count} items', bundle_items_count, { count = bundle_items_count }) | html %]. >+ [% END %] >+ Due on [% new_issue.date_due | $KohaDates as_due_date => 1 %] >+ </p> >+ </div> > [% END %] >- <span>Holds</span> ([% HOLDS.count | html %]) >- [% END %] >- [% WRAPPER tab_item tabname= "account" %] >- <span>Charges ([% total | $Price %])</span> >- [% END %] >- [% END # /WRAPPER tabs_nav %] >- >- [% 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"> >- <p> >- <strong>Checked out: </strong> >- [% new_issue.item.biblio.title | html %] ([% new_issue.item.barcode | html %]). >- [% IF new_issue.item.is_bundle %] >- [% SET bundle_items_count = new_issue.item.bundle_items.count %] >- [% tnx('Bundle of {count} item', 'Bundle of {count} items', bundle_items_count, { count = bundle_items_count }) | html %]. >+ [% IF ( issues_count ) %] >+ [% IF ( Koha.Preference('SCOLoadCheckoutsByDefault') || load_checkouts ) %] >+ <table id="loanTable" class="table table-bordered table-striped"> >+ <caption>Checkouts for [% borrowername | html %] <span class="count">([% issues_count | html %] total)</span></caption> >+ <!-- ISSUES TABLE ROWS --> >+ <thead> >+ <tr> >+ <th class="noshow">Checked out on</th> >+ <th class="all anti-the">Title</th> >+ <th>Call number</th> >+ <th class="psort">Due</th> >+ <th class="all no-sort">Renew</th> >+ [% IF Koha.Preference('SCOAllowCheckin') %] >+ <th class="all no-sort">Check in</th> > [% END %] >- Due on [% new_issue.date_due | $KohaDates as_due_date => 1 %] >- </p> >- </div> >- [% END %] >- [% IF ( issues_count ) %] >- [% IF ( Koha.Preference('SCOLoadCheckoutsByDefault') || load_checkouts ) %] >- <table id="loanTable" class="table table-bordered table-striped"> >- <caption>Checkouts for [% borrowername | html %] <span class="count">([% issues_count | html %] total)</span></caption> >- <!-- ISSUES TABLE ROWS --> >- <thead> >- <tr> >- <th class="noshow">Checked out on</th> >- <th class="all anti-the">Title</th> >- <th>Call number</th> >- <th class="psort">Due</th> >- <th class="all no-sort">Renew</th> >- [% IF Koha.Preference('SCOAllowCheckin') %] >- <th class="all no-sort">Check in</th> >+ [% UNLESS ( nofines ) %] >+ <th>Fines</th> >+ [% END %] >+ <th class="dtr-control-col"></th> >+ </tr> >+ </thead> >+ <tbody> >+ [% FOREACH ISSUE IN ISSUES %] >+ <tr> >+ <td>[% ISSUE.issuedate | html %]</td> >+ <td> >+ [% UNLESS ( noitemlinks ) %] >+ <a href="/cgi-bin/koha/opac-detail.pl?bib=[% ISSUE. biblionumber | uri %]">[% ISSUE.title | html %]</a> >+ [% ELSE %] >+ <strong>[% ISSUE.title | html %]</strong> > [% END %] >- [% UNLESS ( nofines ) %] >- <th>Fines</th> >+ [% IF ( newissues.match(ISSUE.barcode)) %] >+ <span class="badge text-bg-info">NEW</span> > [% END %] >- <th class="dtr-control-col"></th> >- </tr> >- </thead> >- <tbody> >- [% FOREACH ISSUE IN ISSUES %] >- <tr> >- <td>[% ISSUE.issuedate | html %]</td> >- <td> >- [% UNLESS ( noitemlinks ) %] >- <a href="/cgi-bin/koha/opac-detail.pl?bib=[% ISSUE. biblionumber | uri %]">[% ISSUE.title | html %]</a> >+ <span class="item-details">[% ISSUE.author | html %]</span> >+ ([% ISSUE.barcode | html %]) >+ </td> >+ <td>[% ISSUE.itemcallnumber | html %]</td> >+ [% IF ( ISSUE.overdue ) %] >+ <td class="overdue" data-order="[% ISSUE.date_due | html %]"> [% ISSUE.date_due | $KohaDates as_due_date => 1 %] </td> >+ [% ELSE %] >+ <td data-order="[% ISSUE.date_due | html %]"> [% ISSUE.date_due | $KohaDates as_due_date => 1 %] </td> >+ [% END %] >+ <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 %]" /> >+ <input type="hidden" name="barcode" value="[% ISSUE.barcode | html %]" /> >+ <input type="hidden" name="newissues" value="[% newissues | html %]" /> >+ [% IF ISSUE.can_be_renewed %] >+ <input type="hidden" name="op" value="cud-renew" /> >+ <input type="hidden" name="confirmed" value="1" /> >+ [% UNLESS ( ISSUE.renew ) %] >+ <input type="submit" value="Renew item" name="confirm " class="btn btn-primary btn-sm renew" /> >+ [% ELSE %] >+ <input type="submit" value="Renew item" class="btn btn-primary btn-sm renew" /> >+ [% END %] > [% ELSE %] >- <strong>[% ISSUE.title | html %]</strong> >+ [% IF ISSUE.renew_error == 'onsite_checkout' %] >+ <span>This is a on-site checkout, it cannot be renewed.</span> >+ [% ELSIF ISSUE.renew_error == 'too_unseen' %] >+ <span>You have renewed this item the maximum number of consecutive times without it being seen by the library.</span> >+ [% ELSIF ISSUE.renew_error == 'too_soon' %] >+ <span>This item cannot yet be renewed.</span> >+ [% ELSE %] >+ <span>No renewals allowed</span> >+ [% END %] > [% END %] >- [% IF ( newissues.match(ISSUE.barcode)) %] >- <span class="badge text-bg-info">NEW</span> >+ [% IF ISSUE.auto_renew %] >+ <br /><span>This item is scheduled for automatic renewal</span> > [% END %] >- <span class="item-details">[% ISSUE.author | html %]</span> >- ([% ISSUE.barcode | html %]) >- </td> >- <td>[% ISSUE.itemcallnumber | html %]</td> >- [% IF ( ISSUE.overdue ) %] >- <td class="overdue" data-order="[% ISSUE.date_due | html %]"> [% ISSUE.date_due | $KohaDates as_due_date => 1 %] </td> >- [% ELSE %] >- <td data-order="[% ISSUE.date_due | html %]"> [% ISSUE.date_due | $KohaDates as_due_date => 1 %] </td> >- [% END %] >- <td> >- <form action="/cgi-bin/koha/sco/sco-main.pl" method="post"> >- [% INCLUDE 'csrf-token.inc' %] >+ </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 %]" /> > <input type="hidden" name="barcode" value="[% ISSUE.barcode | html %]" /> >- <input type="hidden" name="newissues" value="[% newissues | html %]" /> >- [% IF ISSUE.can_be_renewed %] >- <input type="hidden" name="op" value="cud-renew" /> >- <input type="hidden" name="confirmed" value="1" /> >- [% UNLESS ( ISSUE.renew ) %] >- <input type="submit" value="Renew item" name="confirm " class="btn btn-primary btn-sm renew" /> >- [% ELSE %] >- <input type="submit" value="Renew item" class="btn btn-primary btn-sm renew" /> >- [% END %] >- [% ELSE %] >- [% IF ISSUE.renew_error == 'onsite_checkout' %] >- <span>This is a on-site checkout, it cannot be renewed.</span> >- [% ELSIF ISSUE.renew_error == 'too_unseen' %] >- <span>You have renewed this item the maximum number of consecutive times without it being seen by the library.</span> >- [% ELSIF ISSUE.renew_error == 'too_soon' %] >- <span>This item cannot yet be renewed.</span> >- [% ELSE %] >- <span>No renewals allowed</span> >- [% END %] >- [% END %] >- [% IF ISSUE.auto_renew %] >- <br /><span>This item is scheduled for automatic renewal</span> >- [% END %] >- </form> >- </td> >- [% IF Koha.Preference('SCOAllowCheckin') %] >- <td> >- <form action="/cgi-bin/koha/sco/sco-main.pl" method="post"> >- [% INCLUDE 'csrf-token.inc' %] >- <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 %]" /> >- <input type="hidden" name="barcode" value="[% ISSUE.barcode | html %]" /> >- <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="" /> >- </form> >- </td> >- [% END %] >- [% UNLESS ( nofines ) %] >- <td> [% IF ( ISSUE.charges ) %]Yes[% ELSE %]No[% END %] </td> >- [% END %] >- <td></td> >- </tr> >- [% END # / FOREACH ISSUE %] >- </tbody> >- </table> >- [% ELSE %] >- <a class="btn btn-secondary" href="?load_checkouts=1#scan_form"><i class="fa fa-book" aria-hidden="true"></i> Show your checkouts</a> >- [% END # / IF ( Koha.preference('SCOLoadCheckoutsByDefault') || load_checkouts ) %] >- [% ELSE %] >- <h3>You currently have nothing checked out.</h3> >- [% END # / IF issues_count %] >- </div> >- <!-- / #borrowerdetails --> >- </div> >- [% END # /tab_panel %] >- [% WRAPPER tab_panel tabname="holds" %] >- [% IF HOLDS.count > 0 %] >- [% PROCESS 'holds-table.inc' HOLDS = HOLDS, SuspendHoldsOpac = SuspendHoldsOpac, showpriority = showpriority, AutoResumeSuspendedHolds = AutoResumeSuspendedHolds, onlyinfo = 'true' %] >+ <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 %] >+ [% UNLESS ( nofines ) %] >+ <td> [% IF ( ISSUE.charges ) %]Yes[% ELSE %]No[% END %] </td> >+ [% END %] >+ <td></td> >+ </tr> >+ [% END # / FOREACH ISSUE %] >+ </tbody> >+ </table> >+ [% ELSE %] >+ <a class="btn btn-secondary" href="?load_checkouts=1#scan_form"><i class="fa fa-book" aria-hidden="true"></i> Show your checkouts</a> >+ [% END # / IF ( Koha.preference('SCOLoadCheckoutsByDefault') || load_checkouts ) %] > [% ELSE %] >- <h3>You currently have no pending holds.</h3> >- [% END %] >- [% END # /tab_panel %] >- [% WRAPPER tab_panel tabname="account" %] >- [% PROCESS 'account-table.inc' %] >- [% END # /tab_panel %] >- [% END # /WRAPPER tab_panels %] >- [% END # /WRAPPER tabs %] >- >- [% IF ( SCOMainUserBlock ) %] >- <div id="scomainuserblock"> [% PROCESS koha_news_block news => SCOMainUserBlock %] </div> >- [% END %] >- </div> >- <!-- / .span12 --> >- </div> >- <!-- / .row --> >- </div> >- <!-- / .container-fluid --> >- [% ELSE # IF validuser %] >- <div class="container-fluid"> >- <div class="row"> >- <div class="[% main_div_class | html %]"> >- <div id="masthead"><h1>[% LibraryName | html %] Self-checkout system</h1></div> >- >- [% PROCESS display_errors %] >- >- [% IF patronid && nouser %] >- <div class="alert alert-warning"> >- <p >- >You entered an incorrect username or password. Please try again! But note that passwords are case sensitive. >- [% IF Koha.Preference('FailedLoginAttempts') %] >- Your account will be locked after a fixed number of failed login attempts. >- [% END %] >- Please contact a library staff member if you continue to have problems.</p >- > >- </div> >- [% END %] >- >- <div class="sco_entry"> >- <form id="mainform" action="/cgi-bin/koha/sco/sco-main.pl" name="mainform" method="post"> >- [% INCLUDE 'csrf-token.inc' %] >- <fieldset> >- <legend>Log in to your account</legend> >- <div class="row"> >- <div class="col-md-6"> >- [% IF ( Koha.Preference('SelfCheckoutByLogin') ) %] >- <div class="row"> >- <div class="col-md-12"> [% PROCESS login_label for="patronlogin" %] </div> >- <div class="col-md-12"> >- <input type="text" id="patronlogin" class="form-control focus noEnterSubmit" size="20" name="patronlogin" autocomplete="off" /> >- </div> >- <div class="col-md-12"> >- <label for="patronpw">Password:</label> >- </div> >- <div class="col-md-12"> >- <input type="password" id="patronpw" class="form-control" size="20" name="patronpw" autocomplete="off" /> >- </div> >- <div class="col-md-12"> >- <button type="submit" class="btn btn-primary">Log in</button> >- </div> >- </div> >- <!-- /.row --> >- [% ELSE %] >- <div class="row"> >- <div class="col-md-12"> >- <label for="patronid">Please enter your card number:</label> >- </div> >- <div class="col-md-12"> >- <input type="text" id="patronid" class="form-control focus" size="20" name="patronid" autocomplete="off" /> >- </div> >- <div class="col-md-12"> >- <button type="submit" class="btn btn-primary">Submit</button> >- </div> >- </div> >- <!-- /.row --> >- [% END %] >- </div> >- <!-- /.col-md-6 --> >- </div> >- <!-- /.row --> >- [% FOREACH INPUT IN INPUTS %] >- <input type="hidden" name="[% INPUT.name | html %]" value="[% INPUT.value | html %]" /> >- [% END %] >- <input type="hidden" name="op" value="cud-login" /> >- </fieldset> >- </form> >- <!-- /#mainform --> >- </div> >- <!-- / .sco_entry --> >- [% IF ( SCOMainUserBlock ) %] >- <div id="scomainuserblock"> [% PROCESS koha_news_block news => SCOMainUserBlock %] </div> >- [% END %] >- </div> >- <!-- / .span12 --> >+ <h3>You currently have nothing checked out.</h3> >+ [% END # / IF issues_count %] >+ </div> >+ <!-- / #borrowerdetails --> >+ [% END # /tab_panel %] >+ [% WRAPPER tab_panel tabname="holds" %] >+ [% IF HOLDS.count > 0 %] >+ [% PROCESS 'holds-table.inc' HOLDS = HOLDS, SuspendHoldsOpac = SuspendHoldsOpac, showpriority = showpriority, AutoResumeSuspendedHolds = AutoResumeSuspendedHolds, onlyinfo = 'true' %] >+ [% ELSE %] >+ <h3>You currently have no pending holds.</h3> >+ [% END %] >+ [% END # /tab_panel %] >+ [% WRAPPER tab_panel tabname="account" %] >+ [% PROCESS 'account-table.inc' %] >+ [% END # /tab_panel %] >+ [% END # /WRAPPER tab_panels %] >+ [% END # /WRAPPER tabs %] >+ >+ [% IF ( SCOMainUserBlock ) %] >+ <div id="scomainuserblock"> [% PROCESS koha_news_block news => SCOMainUserBlock %] </div> >+ [% END %] > </div> >- <!-- / .row --> >+ <!-- / .span12 --> > </div> >- <!-- / .container-fluid --> >- [% END # / IF validuser %] >- [% ELSE # / UNLESS ( hide_main %] >+ <!-- / .row --> >+ </div> >+ <!-- / .container-fluid --> >+ [% ELSE # IF validuser %] > <div class="container-fluid"> > <div class="row"> > <div class="[% main_div_class | html %]"> >@@ -354,6 +273,69 @@ > > [% PROCESS display_errors %] > >+ [% IF patronid && nouser %] >+ <div class="alert alert-warning"> >+ <p >+ >You entered an incorrect username or password. Please try again! But note that passwords are case sensitive. >+ [% IF Koha.Preference('FailedLoginAttempts') %] >+ Your account will be locked after a fixed number of failed login attempts. >+ [% END %] >+ Please contact a library staff member if you continue to have problems.</p >+ > >+ </div> >+ [% END %] >+ >+ <div class="sco_entry"> >+ <form id="mainform" action="/cgi-bin/koha/sco/sco-main.pl" name="mainform" method="post"> >+ [% INCLUDE 'csrf-token.inc' %] >+ <fieldset> >+ <legend>Log in to your account</legend> >+ <div class="row"> >+ <div class="col-md-6"> >+ [% IF ( Koha.Preference('SelfCheckoutByLogin') ) %] >+ <div class="row"> >+ <div class="col-md-12"> [% PROCESS login_label for="patronlogin" %] </div> >+ <div class="col-md-12"> >+ <input type="text" id="patronlogin" class="form-control focus noEnterSubmit" size="20" name="patronlogin" autocomplete="off" /> >+ </div> >+ <div class="col-md-12"> >+ <label for="patronpw">Password:</label> >+ </div> >+ <div class="col-md-12"> >+ <input type="password" id="patronpw" class="form-control" size="20" name="patronpw" autocomplete="off" /> >+ </div> >+ <div class="col-md-12"> >+ <button type="submit" class="btn btn-primary">Log in</button> >+ </div> >+ </div> >+ <!-- /.row --> >+ [% ELSE %] >+ <div class="row"> >+ <div class="col-md-12"> >+ <label for="patronid">Please enter your card number:</label> >+ </div> >+ <div class="col-md-12"> >+ <input type="text" id="patronid" class="form-control focus" size="20" name="patronid" autocomplete="off" /> >+ </div> >+ <div class="col-md-12"> >+ <button type="submit" class="btn btn-primary">Submit</button> >+ </div> >+ </div> >+ <!-- /.row --> >+ [% END %] >+ </div> >+ <!-- /.col-md-6 --> >+ </div> >+ <!-- /.row --> >+ [% FOREACH INPUT IN INPUTS %] >+ <input type="hidden" name="[% INPUT.name | html %]" value="[% INPUT.value | html %]" /> >+ [% END %] >+ <input type="hidden" name="op" value="cud-login" /> >+ </fieldset> >+ </form> >+ <!-- /#mainform --> >+ </div> >+ <!-- / .sco_entry --> > [% IF ( SCOMainUserBlock ) %] > <div id="scomainuserblock"> [% PROCESS koha_news_block news => SCOMainUserBlock %] </div> > [% END %] >@@ -363,335 +345,352 @@ > <!-- / .row --> > </div> > <!-- / .container-fluid --> >- [% END # / UNLESS ( hide_main %] >- </main> >- <!-- / .main --> >- <span id="audio-alert"></span> >- >- [% INCLUDE 'opac-bottom.inc' %] >- [% BLOCK jsinclude %] >- [% INCLUDE 'datatables.inc' %] >- <script> >- function mungeHistory() { >- // prevent back button from allowing form resubmission >- if (history && history.pushState) { >- history.replaceState(null, document.title, window.location.href); >- } >- } >- var mainTimeout; >- function sco_init() { >- mainTimeout = setTimeout(function() { >- location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout'; >- }, [% SelfCheckTimeout | html %]); >- } >- function dofocus() { // named function req'd for body onload event by some FF and IE7 security models >- // alert("dofocus called"); >- $(".focus:last").select(); >- } >- var slip_re = /slip/; >- function printx_window(print_type) { >- var handler = print_type.match(slip_re) ? "printslip" : "moremember"; >+ [% END # / IF validuser %] >+ [% ELSE # / UNLESS ( hide_main %] >+ <div class="container-fluid"> >+ <div class="row"> >+ <div class="[% main_div_class | html %]"> >+ <div id="masthead"><h1>[% LibraryName | html %] Self-checkout system</h1></div> >+ >+ [% PROCESS display_errors %] > >- return false; >+ [% IF ( SCOMainUserBlock ) %] >+ <div id="scomainuserblock"> [% PROCESS koha_news_block news => SCOMainUserBlock %] </div> >+ [% END %] >+ </div> >+ <!-- / .span12 --> >+ </div> >+ <!-- / .row --> >+ </div> >+ <!-- / .container-fluid --> >+ [% END # / UNLESS ( hide_main %] >+</main> >+<!-- / .main --> >+<span id="audio-alert"></span> >+ >+[% INCLUDE 'opac-bottom.inc' %] >+[% BLOCK jsinclude %] >+ [% INCLUDE 'datatables.inc' %] >+ <script> >+ function mungeHistory() { >+ // prevent back button from allowing form resubmission >+ if (history && history.pushState) { >+ history.replaceState(null, document.title, window.location.href); > } >- function checkout_confirm(patronid) { >- var barcode = $("#barcode").val(); >- // alert("checkout_confirm('" + patronid + "') called for barcode '" + barcode + "'"); >- if (! barcode) { dofocus(); return false; } // no barcode >- if (barcode == "__KOHA_NEW_CIRC__") { // magic barcode >- window.location.href='/cgi-bin/koha/sco/sco-main.pl?op=logout'; >- return false; >- } >- return true; >+ } >+ var mainTimeout; >+ function sco_init() { >+ mainTimeout = setTimeout(function() { >+ location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout'; >+ }, [% SelfCheckTimeout | html %]); >+ } >+ function dofocus() { // named function req'd for body onload event by some FF and IE7 security models >+ // alert("dofocus called"); >+ $(".focus:last").select(); >+ } >+ var slip_re = /slip/; >+ function printx_window(print_type) { >+ var handler = print_type.match(slip_re) ? "printslip" : "moremember"; >+ >+ return false; >+ } >+ function checkout_confirm(patronid) { >+ var barcode = $("#barcode").val(); >+ // alert("checkout_confirm('" + patronid + "') called for barcode '" + barcode + "'"); >+ if (! barcode) { dofocus(); return false; } // no barcode >+ if (barcode == "__KOHA_NEW_CIRC__") { // magic barcode >+ window.location.href='/cgi-bin/koha/sco/sco-main.pl?op=logout'; >+ return false; > } >- [% IF Koha.Preference('AudioAlerts') %] >- var AUDIO_ALERTS = JSON.parse( "[% To.json(AudioAlerts.AudioAlerts) | $raw %]" ); >- $( document ).ready(function() { >- if ( AUDIO_ALERTS ) { >- for ( var k in AUDIO_ALERTS ) { >- var alert = AUDIO_ALERTS[k]; >- if ( $( alert.selector ).length ) { >- playSound( alert.sound ); >- break; >- } >+ return true; >+ } >+ [% IF Koha.Preference('AudioAlerts') %] >+ var AUDIO_ALERTS = JSON.parse( "[% To.json(AudioAlerts.AudioAlerts) | $raw %]" ); >+ $( document ).ready(function() { >+ if ( AUDIO_ALERTS ) { >+ for ( var k in AUDIO_ALERTS ) { >+ var alert = AUDIO_ALERTS[k]; >+ if ( $( alert.selector ).length ) { >+ playSound( alert.sound ); >+ break; > } > } >- }); >- function playSound( sound ) { >- if (!(sound.indexOf("http://") === 0 || sound.indexOf("https://") === 0)) { >- sound = '[% interface | html %]' + '/bootstrap/sound/' + sound; >- } >- document.getElementById("audio-alert").innerHTML = '<audio src="' + sound + '" autoplay="autoplay" autobuffer="autobuffer"></audio>'; > } >- [% END %] >- >- $( window ).on( "load", function() { >- dofocus(); > }); >+ function playSound( sound ) { >+ if (!(sound.indexOf("http://") === 0 || sound.indexOf("https://") === 0)) { >+ sound = '[% interface | html %]' + '/bootstrap/sound/' + sound; >+ } >+ document.getElementById("audio-alert").innerHTML = '<audio src="' + sound + '" autoplay="autoplay" autobuffer="autobuffer"></audio>'; >+ } >+ [% END %] > >- $( window ).on( "unload", function() { >- mungeHistory(); >- }); >+ $( window ).on( "load", function() { >+ dofocus(); >+ }); > >- $(document).ready(function() { >- dofocus(); >- [% IF ( patronid ) %]sco_init();[% END %] >- >- var dTables = $("#loanTable, #holdst, #finestable"); >- dTables.each(function(){ >- var thIndex = $(this).find("th.psort").index(); >- $(this).kohaTable({ >- sorting: [[thIndex, "asc"]], >- dom: '<"top"<"table_entries"><"table_controls"f>>t<"clear">', >- columnDefs: [ >- { targets: ["noshow"], visible: false, searchable: false }, >- { visible: false, targets: ["hidden"] }, >- { className: "dtr-control", orderable: false, targets: -1 }, >- ], >- language: { >- search: "_INPUT_", >- searchPlaceholder: _("Search"), >- }, >- responsive: { >- details: { >- type: "column", >- target: -1, >- }, >+ $( window ).on( "unload", function() { >+ mungeHistory(); >+ }); >+ >+ $(document).ready(function() { >+ dofocus(); >+ [% IF ( patronid ) %]sco_init();[% END %] >+ >+ var dTables = $("#loanTable, #holdst, #finestable"); >+ dTables.each(function(){ >+ var thIndex = $(this).find("th.psort").index(); >+ $(this).kohaTable({ >+ sorting: [[thIndex, "asc"]], >+ dom: '<"top"<"table_entries"><"table_controls"f>>t<"clear">', >+ columnDefs: [ >+ { targets: ["noshow"], visible: false, searchable: false }, >+ { visible: false, targets: ["hidden"] }, >+ { className: "dtr-control", orderable: false, targets: -1 }, >+ ], >+ language: { >+ search: "_INPUT_", >+ searchPlaceholder: _("Search"), >+ }, >+ responsive: { >+ details: { >+ type: "column", >+ target: -1, > }, >- }); >+ }, > }); >+ }); > >- $('a[data-bs-toggle="tab"]').on('shown.bs.tab', function (event) { >- dTables.DataTable().responsive.recalc(); >- } ); >- >- $("#logout_form").on("click", function(e){ >- e.preventDefault(e); >- clearTimeout(mainTimeout); >- [% IF Koha.Preference('SelfCheckReceiptPrompt') %] >- confirmModal("", _("Would you like to print a receipt?"), _("Print receipt and end session"), _("End session"), function(result) { >- if ( result ){ >- var win = window.open("/cgi-bin/koha/sco/printslip.pl?print=qslip"); >- location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout'; >- } else { >- location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout'; >- } >- }); >- [% ELSE %] >- location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout'; >- [% END %] >+ $('a[data-bs-toggle="tab"]').on('shown.bs.tab', function (event) { >+ dTables.DataTable().responsive.recalc(); >+ } ); >+ >+ $("#logout_form").on("click", function(e){ >+ e.preventDefault(e); >+ clearTimeout(mainTimeout); >+ [% IF Koha.Preference('SelfCheckReceiptPrompt') %] >+ confirmModal("", _("Would you like to print a receipt?"), _("Print receipt and end session"), _("End session"), function(result) { >+ if ( result ){ >+ var win = window.open("/cgi-bin/koha/sco/printslip.pl?print=qslip"); >+ location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout'; >+ } else { >+ location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout'; >+ } >+ }); >+ [% ELSE %] >+ location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout'; >+ [% END %] > >- return true; >- }); >+ return true; >+ }); > >- $("#scan_form").on("submit", function(){ >- return checkout_confirm('[% patronid | html %]'); >- }); >- }); >+ $("#scan_form").on("submit", function(){ >+ return checkout_confirm('[% patronid | html %]'); >+ }); >+ }); >+ </script> >+ [% Asset.js("js/holds.js") | $raw %] >+ [% IF ( Koha.Preference('SCOUserJS') ) %] >+ <script> >+ [% Koha.Preference('SCOUserJS') | $raw %] > </script> >- [% Asset.js("js/holds.js") | $raw %] >- [% IF ( Koha.Preference('SCOUserJS') ) %] >- <script> >- [% Koha.Preference('SCOUserJS') | $raw %] >- </script> >- [% END %] > [% END %] >+[% END %] > >- [% BLOCK display_errors %] >- [% FOREACH item IN impossible %] >- <!-- We tried to issue, but failed. --> >- <div class="alert alert-warning"> >- <span class="sco-alert-warning noissue"></span> >- <h2>Item cannot be checked out.</h2> >- <p>Sorry, this item cannot be checked out at this station.</p> >- [% IF ( item.title ) %] >- <p>Title: <em>[% item.title | html %]</em> </p> >- [% END %] >+[% BLOCK display_errors %] >+ [% FOREACH item IN impossible %] >+ <!-- We tried to issue, but failed. --> >+ <div class="alert alert-warning"> >+ <span class="sco-alert-warning noissue"></span> >+ <h2>Item cannot be checked out.</h2> >+ <p>Sorry, this item cannot be checked out at this station.</p> >+ [% IF ( item.title ) %] >+ <p>Title: <em>[% item.title | html %]</em> </p> >+ [% END %] > >- <p> >- [% IF ( item.circ_error_UNKNOWN_BARCODE ) %] >- <span id="ce_unknown_barcode">The system does not recognize this barcode.</span> >- [% ELSIF ( item.circ_error_max_loans_allowed ) %] >- <span id="ce_max_loans_allowed">You have reached the maximum limit of items checked out.</span> >- [% ELSIF ( item.circ_error_ISSUED_TO_ANOTHER ) %] >- <span id="ce_issued_to_another">This item is checked out to someone else.</span> >- [% ELSIF ( item.circ_error_NO_MORE_RENEWALS ) %] >- <span id="ce_no_more_renewals">You cannot renew this item again.</span> >- [% ELSIF ( item.circ_error_NOT_FOR_LOAN ) %] >- <span id="ce_not_for_loan">This item is not for loan.</span> >- [% ELSIF ( item.circ_error_DEBT ) %] >- <span id="ce_too_much_debt">You owe the library [% item.DEBT | $Price with_symbol => 1 %] and cannot check out.</span> >- [% ELSIF ( item.circ_error_WTHDRAWN ) %] >- <span id="ce_wthdrawn">This item has been withdrawn from the collection.</span> >- [% ELSIF ( item.circ_error_RESTRICTED ) %] >- <span id="ce_restricted">This item is restricted.</span> >- [% ELSIF ( item.circ_error_RESERVED ) %] >- <span id="ce_reserved">This item is on hold for another patron.</span> >- [% ELSIF ( item.circ_error_ITEMNOTSAMEBRANCH ) %] >- <span id="ce_itemnotsamebranch">This item belongs to another library.</span> >- [% ELSIF ( item.circ_error_EXPIRED ) %] >- <span id="ce_expired">Your account has expired.</span> >- [% ELSIF ( item.circ_error_DEBARRED ) %] >- <span id="ce_debarred">Your account has been suspended.</span> >- [% ELSIF ( item.circ_error_CARD_LOST ) %] >- <span id="ce_card_lost">This library card has been declared lost.</span> >- [% ELSIF ( item.circ_error_GNA ) %] >- <span id="ce_gna">Your contact information seems to be incomplete.</span> >- [% ELSIF ( item.circ_error_INVALID_DATE ) %] >- <span id="ce_invalid_date">Due date is not valid.</span> >- [% ELSIF ( item.circ_error_ADDITIONAL_MATERIALS ) %] >- <span id="ce_addtional_materials">Item must be checked out at a circulation desk.</span> >- [% END %] >- <span id="ce_see_staff">Please see a member of the library staff.</span> >- </p> >- >- [% IF ( item.returnitem && Koha.Preference('SCOAllowCheckin') ) %] >- <form action="/cgi-bin/koha/sco/sco-main.pl" name="errorForm" class="inline" method="post"> >- [% INCLUDE 'csrf-token.inc' %] >- <legend class="sr-only">Return</legend> >- <input type="hidden" name="op" value="cud-returnbook" /> >- <input type="hidden" name="patronid" value="[% patronid | html %]" /> >- <input type="hidden" name="barcode" value="[% item.barcode | html %]" /> >- <input type="hidden" name="load_checkouts" value="[% load_checkouts | html %]" /> >- <input type="hidden" name="newissues" value="[% newissues | html %]" /> >- <button type="submit" name="returnbook" class="btn btn-primary"><i class="fa fa-undo" aria-hidden="true"></i> Return this item</button> >- </form> >+ <p> >+ [% IF ( item.circ_error_UNKNOWN_BARCODE ) %] >+ <span id="ce_unknown_barcode">The system does not recognize this barcode.</span> >+ [% ELSIF ( item.circ_error_max_loans_allowed ) %] >+ <span id="ce_max_loans_allowed">You have reached the maximum limit of items checked out.</span> >+ [% ELSIF ( item.circ_error_ISSUED_TO_ANOTHER ) %] >+ <span id="ce_issued_to_another">This item is checked out to someone else.</span> >+ [% ELSIF ( item.circ_error_NO_MORE_RENEWALS ) %] >+ <span id="ce_no_more_renewals">You cannot renew this item again.</span> >+ [% ELSIF ( item.circ_error_NOT_FOR_LOAN ) %] >+ <span id="ce_not_for_loan">This item is not for loan.</span> >+ [% ELSIF ( item.circ_error_DEBT ) %] >+ <span id="ce_too_much_debt">You owe the library [% item.DEBT | $Price with_symbol => 1 %] and cannot check out.</span> >+ [% ELSIF ( item.circ_error_WTHDRAWN ) %] >+ <span id="ce_wthdrawn">This item has been withdrawn from the collection.</span> >+ [% ELSIF ( item.circ_error_RESTRICTED ) %] >+ <span id="ce_restricted">This item is restricted.</span> >+ [% ELSIF ( item.circ_error_RESERVED ) %] >+ <span id="ce_reserved">This item is on hold for another patron.</span> >+ [% ELSIF ( item.circ_error_ITEMNOTSAMEBRANCH ) %] >+ <span id="ce_itemnotsamebranch">This item belongs to another library.</span> >+ [% ELSIF ( item.circ_error_EXPIRED ) %] >+ <span id="ce_expired">Your account has expired.</span> >+ [% ELSIF ( item.circ_error_DEBARRED ) %] >+ <span id="ce_debarred">Your account has been suspended.</span> >+ [% ELSIF ( item.circ_error_CARD_LOST ) %] >+ <span id="ce_card_lost">This library card has been declared lost.</span> >+ [% ELSIF ( item.circ_error_GNA ) %] >+ <span id="ce_gna">Your contact information seems to be incomplete.</span> >+ [% ELSIF ( item.circ_error_INVALID_DATE ) %] >+ <span id="ce_invalid_date">Due date is not valid.</span> >+ [% ELSIF ( item.circ_error_ADDITIONAL_MATERIALS ) %] >+ <span id="ce_addtional_materials">Item must be checked out at a circulation desk.</span> > [% END %] >- >- <form action="/cgi-bin/koha/sco/sco-main.pl" name="errorForm" class="inline" method="get"> >- <legend class="sr-only">Error</legend> >- <input type="hidden" name="op" value="" /> >+ <span id="ce_see_staff">Please see a member of the library staff.</span> >+ </p> >+ >+ [% IF ( item.returnitem && Koha.Preference('SCOAllowCheckin') ) %] >+ <form action="/cgi-bin/koha/sco/sco-main.pl" name="errorForm" class="inline" method="post"> >+ [% INCLUDE 'csrf-token.inc' %] >+ <legend class="sr-only">Return</legend> >+ <input type="hidden" name="op" value="cud-returnbook" /> > <input type="hidden" name="patronid" value="[% patronid | html %]" /> > <input type="hidden" name="barcode" value="[% item.barcode | html %]" /> > <input type="hidden" name="load_checkouts" value="[% load_checkouts | html %]" /> > <input type="hidden" name="newissues" value="[% newissues | html %]" /> >- <input type="submit" name="confirm" value="Return to account summary" class="btn btn-info back focus" /> >+ <button type="submit" name="returnbook" class="btn btn-primary"><i class="fa fa-undo" aria-hidden="true"></i> Return this item</button> > </form> >- </div> >- <!-- / .alert --> >- [% END # / FOREACH impossible %] >- >- [% FOREACH c IN confirm %] >- <!-- We need to confirm the issue.. --> >- <div class="alert alert-warning" >- ><h2>Please confirm the checkout:</h2> >- <span class="sco-alert-warning confirm"></span> >- [% IF ( c.confirm_renew_issue ) %] >- <p>This item is already checked out to you: <b>[% c.confirm | html %]</b> <i>([% c.barcode | html %])</i></p> >- [% END %] >+ [% END %] > >- [% IF ( c.renew && Koha.Preference('SCOAllowCheckin') ) %] >- <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post"> >- [% INCLUDE 'csrf-token.inc' %] >- <legend class="sr-only">Return</legend> >- <input type="hidden" name="op" value="cud-returnbook" /> >- <input type="hidden" name="patronid" value="[% patronid | html %]" /> >- <input type="hidden" name="barcode" value="[% c.barcode | html %]" /> >- <input type="hidden" name="load_checkouts" value="[% load_checkouts | html %]" /> >- <input type="hidden" name="confirmed" value="" /> >- <input type="hidden" name="newissues" value="[% newissues | html %]" /> >- <button type="submit" name="returnbook" class="btn btn-primary"><i class="fa fa-undo" aria-hidden="true"></i> Return this item</button> >- </form> >- [% END %] >+ <form action="/cgi-bin/koha/sco/sco-main.pl" name="errorForm" class="inline" method="get"> >+ <legend class="sr-only">Error</legend> >+ <input type="hidden" name="op" value="" /> >+ <input type="hidden" name="patronid" value="[% patronid | html %]" /> >+ <input type="hidden" name="barcode" value="[% item.barcode | html %]" /> >+ <input type="hidden" name="load_checkouts" value="[% load_checkouts | html %]" /> >+ <input type="hidden" name="newissues" value="[% newissues | html %]" /> >+ <input type="submit" name="confirm" value="Return to account summary" class="btn btn-info back focus" /> >+ </form> >+ </div> >+ <!-- / .alert --> >+ [% END # / FOREACH impossible %] >+ >+ [% FOREACH c IN confirm %] >+ <!-- We need to confirm the issue.. --> >+ <div class="alert alert-warning" >+ ><h2>Please confirm the checkout:</h2> >+ <span class="sco-alert-warning confirm"></span> >+ [% IF ( c.confirm_renew_issue ) %] >+ <p>This item is already checked out to you: <b>[% c.confirm | html %]</b> <i>([% c.barcode | html %])</i></p> >+ [% END %] > >- [% UNLESS ( c.renew ) %] >- <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post"> >- [% INCLUDE 'csrf-token.inc' %] >- <legend class="sr-only">Renew</legend> >- <input type="hidden" name="op" value="cud-renew" /> >- <input type="hidden" name="patronid" value="[% patronid | html %]" /> >- <input type="hidden" name="barcode" value="[% c.barcode | html %]" /> >- <input type="hidden" name="load_checkouts" value="[% load_checkouts | html %]" /> >- <input type="hidden" name="confirmed" value="1" /> >- <input type="hidden" name="newissues" value="[% newissues | html %]" /> >- <button type="submit" name="confirm" class="btn btn-primary"><i class="fa-solid fa-rotate" aria-hidden="true"></i> Renew item</button> >- </form> >- [% ELSE %] >- <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post"> >- [% INCLUDE 'csrf-token.inc' %] >- <legend class="sr-only">Renew</legend> >- <input type="hidden" name="op" value="cud-renew" /> >- <input type="hidden" name="patronid" value="[% patronid | html %]" /> >- <input type="hidden" name="barcode" value="[% c.barcode | html %]" /> >- <input type="hidden" name="load_checkouts" value="[% load_checkouts | html %]" /> >- <input type="hidden" name="confirmed" value="1" /> >- <input type="hidden" name="newissues" value="[% newissues | html %]" /> >- <button type="submit" class="btn btn-primary"><i class="fa-solid fa-rotate" aria-hidden="true"></i> Renew item</button> >- </form> >- [% END %] >+ [% IF ( c.renew && Koha.Preference('SCOAllowCheckin') ) %] >+ <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post"> >+ [% INCLUDE 'csrf-token.inc' %] >+ <legend class="sr-only">Return</legend> >+ <input type="hidden" name="op" value="cud-returnbook" /> >+ <input type="hidden" name="patronid" value="[% patronid | html %]" /> >+ <input type="hidden" name="barcode" value="[% c.barcode | html %]" /> >+ <input type="hidden" name="load_checkouts" value="[% load_checkouts | html %]" /> >+ <input type="hidden" name="confirmed" value="" /> >+ <input type="hidden" name="newissues" value="[% newissues | html %]" /> >+ <button type="submit" name="returnbook" class="btn btn-primary"><i class="fa fa-undo" aria-hidden="true"></i> Return this item</button> >+ </form> >+ [% END %] > >- <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="get"> >- <legend class="sr-only">Cancel</legend> >- <input type="hidden" name="op" value="" /> >+ [% UNLESS ( c.renew ) %] >+ <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post"> >+ [% INCLUDE 'csrf-token.inc' %] >+ <legend class="sr-only">Renew</legend> >+ <input type="hidden" name="op" value="cud-renew" /> > <input type="hidden" name="patronid" value="[% patronid | html %]" /> >+ <input type="hidden" name="barcode" value="[% c.barcode | html %]" /> > <input type="hidden" name="load_checkouts" value="[% load_checkouts | html %]" /> >+ <input type="hidden" name="confirmed" value="1" /> > <input type="hidden" name="newissues" value="[% newissues | html %]" /> >- <button type="submit" class="btn btn-primary"><i class="fa fa-cancel" aria-hidden="true"></i> Cancel</button> >+ <button type="submit" name="confirm" class="btn btn-primary"><i class="fa-solid fa-rotate" aria-hidden="true"></i> Renew item</button> > </form> >- </div> >- [% END # / FOREACH confirm %] >- >- [% IF ( nopermission ) %] >- <!-- This is what is displayed if user doesn't have permission --> >- <div class="alert alert-warning"> >- <span class="sco-alert-warning nopermission"></span> >- <h2>Access denied</h2> >- <p>Sorry, this self-checkout station has lost authentication. Please contact the administrator to resolve this problem.</p> >- </div> >- [% END %] >+ [% ELSE %] >+ <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post"> >+ [% INCLUDE 'csrf-token.inc' %] >+ <legend class="sr-only">Renew</legend> >+ <input type="hidden" name="op" value="cud-renew" /> >+ <input type="hidden" name="patronid" value="[% patronid | html %]" /> >+ <input type="hidden" name="barcode" value="[% c.barcode | html %]" /> >+ <input type="hidden" name="load_checkouts" value="[% load_checkouts | html %]" /> >+ <input type="hidden" name="confirmed" value="1" /> >+ <input type="hidden" name="newissues" value="[% newissues | html %]" /> >+ <button type="submit" class="btn btn-primary"><i class="fa-solid fa-rotate" aria-hidden="true"></i> Renew item</button> >+ </form> >+ [% END %] > >- [% IF ( different_ip ) %] >- <!-- This is what is displayed if user doesn't have permission --> >- <div class="alert alert-warning"> >- <span class="sco-alert-warning sessionlost"></span> >- <h2>Session lost</h2> >- <p>You are accessing self-checkout from a different IP address! please log in again.</p> >- </div> >- [% END %] >+ <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="get"> >+ <legend class="sr-only">Cancel</legend> >+ <input type="hidden" name="op" value="" /> >+ <input type="hidden" name="patronid" value="[% patronid | html %]" /> >+ <input type="hidden" name="load_checkouts" value="[% load_checkouts | html %]" /> >+ <input type="hidden" name="newissues" value="[% newissues | html %]" /> >+ <button type="submit" class="btn btn-primary"><i class="fa fa-cancel" aria-hidden="true"></i> Cancel</button> >+ </form> >+ </div> >+ [% END # / FOREACH confirm %] >+ >+ [% IF ( nopermission ) %] >+ <!-- This is what is displayed if user doesn't have permission --> >+ <div class="alert alert-warning"> >+ <span class="sco-alert-warning nopermission"></span> >+ <h2>Access denied</h2> >+ <p>Sorry, this self-checkout station has lost authentication. Please contact the administrator to resolve this problem.</p> >+ </div> >+ [% END %] > >- [% IF ( invalid_username_or_password ) %] >- <!-- This is what is displayed if user doesn't have permission --> >- <div class="alert alert-warning"> >- <span class="sco-alert-warning notfound"></span> >- <h2>Record not found</h2> >- <p>Your userid was not found in the database. Please try again.</p> >- </div> >- [% END %] >+ [% IF ( different_ip ) %] >+ <!-- This is what is displayed if user doesn't have permission --> >+ <div class="alert alert-warning"> >+ <span class="sco-alert-warning sessionlost"></span> >+ <h2>Session lost</h2> >+ <p>You are accessing self-checkout from a different IP address! please log in again.</p> >+ </div> >+ [% END %] > >- [% IF ( issued ) %] >- [% IF batch_checkouts_allowed %] >- [% FOREACH barcode IN newissues.split(',') %] >- <span class="sco-alert-success issue"></span> >- <div class="alert alert-info"> >- <p>Item checked out <i>([% barcode | html %])</i></p> >- </div> >- [% END %] >- [% ELSE %] >+ [% IF ( invalid_username_or_password ) %] >+ <!-- This is what is displayed if user doesn't have permission --> >+ <div class="alert alert-warning"> >+ <span class="sco-alert-warning notfound"></span> >+ <h2>Record not found</h2> >+ <p>Your userid was not found in the database. Please try again.</p> >+ </div> >+ [% END %] >+ >+ [% IF ( issued ) %] >+ [% IF batch_checkouts_allowed %] >+ [% FOREACH barcode IN newissues.split(',') %] > <span class="sco-alert-success issue"></span> > <div class="alert alert-info"> >- <p>Item checked out <i>([% newissues.split(',').last | html %])</i></p> >+ <p>Item checked out <i>([% barcode | html %])</i></p> > </div> > [% END %] >- [% ELSIF ( renewed ) %] >- <span class="sco-alert-success renew"></span> >- <div class="alert alert-info"> >- <p>Item renewed <i>([% barcode | html %])</i></p> >- </div> >- [% ELSIF ( renewed == 0) %] >- <span class="sco-alert-warning renew"></span> >- <div class="alert alert-info"> >- <p>Item not renewed</p> >- </div> >- [% ELSIF ( returned == 0 ) %] >- <span class="sco-alert-warning return"></span> >- <div class="alert alert-info"> >- <p>Item not checked in: please see circulation staff for assistance</p> >- </div> >- [% ELSIF ( returned == 1 ) %] >- <span class="sco-alert-success return"></span> >+ [% ELSE %] >+ <span class="sco-alert-success issue"></span> > <div class="alert alert-info"> >- <p>Item checked in <i>([% barcode | html %])</i></p> >+ <p>Item checked out <i>([% newissues.split(',').last | html %])</i></p> > </div> > [% END %] >+ [% ELSIF ( renewed ) %] >+ <span class="sco-alert-success renew"></span> >+ <div class="alert alert-info"> >+ <p>Item renewed <i>([% barcode | html %])</i></p> >+ </div> >+ [% ELSIF ( renewed == 0) %] >+ <span class="sco-alert-warning renew"></span> >+ <div class="alert alert-info"> >+ <p>Item not renewed</p> >+ </div> >+ [% ELSIF ( returned == 0 ) %] >+ <span class="sco-alert-warning return"></span> >+ <div class="alert alert-info"> >+ <p>Item not checked in: please see circulation staff for assistance</p> >+ </div> >+ [% ELSIF ( returned == 1 ) %] >+ <span class="sco-alert-success return"></span> >+ <div class="alert alert-info"> >+ <p>Item checked in <i>([% barcode | html %])</i></p> >+ </div> > [% END %] >-</div> >+[% END %] >-- >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