8 [% INCLUDE 'doc-head-open.inc' %]
9 <title>Self checkout › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha [% END %]</title>
10 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
11 <meta name="generator" content="Koha [% Version | html %]" /> <!-- leave this for stats -->
12 [% IF ( Koha.Preference('OpacFavicon') ) %]
13 <link rel="shortcut icon" href="[% Koha.Preference('OpacFavicon') | url %]" type="image/x-icon" />
15 <link rel="shortcut icon" href="[% interface | html %]/[% theme | html %]/images/favicon.ico" type="image/x-icon" />
17 [% Asset.css("lib/fontawesome/css/fontawesome.min.css") | $raw %]
18 [% Asset.css("lib/fontawesome/css/brands.min.css") | $raw %]
19 [% Asset.css("lib/fontawesome/css/solid.min.css") | $raw %]
21 [% Asset.css("css/sco-rtl.css") | $raw %]
23 [% Asset.css("css/sco.css") | $raw %]
25 [% IF ( Koha.Preference('OPACUserCSS') ) %]<style>[% Koha.Preference('OPACUserCSS') | $raw %]</style>[% END %]
26 [% IF Branches.GetBranchSpecificCSS( Branches.GetLoggedInBranchcode() || default_branch) %]
28 [% Branches.GetBranchSpecificCSS( Branches.GetLoggedInBranchcode() || default_branch) | $raw %]
31 [% IF ( Koha.Preference('SCOUserCSS') ) %]<style>[% Koha.Preference('SCOUserCSS') | $raw %]</style>[% END %]
34 function _(s) { return s } // dummy function for gettext
36 [% IF lang && lang != 'en' %]
37 [% Asset.js(lang _ '/js/locale_data.js') | $raw %]
39 [% Asset.js('js/Gettext.js') | $raw %]
40 [% Asset.js('js/i18n.js') | $raw %]
42 <body id="sco_main" class="sco" onload="dofocus();" onunload="mungeHistory();">
43 [% INCLUDE 'masthead-sco.inc' %]
46 <div class="container-fluid">
48 [% IF ( display_patron_image ) %]
49 <div class="col-10 order-first order-md-first order-lg-2">
51 <div class="col order-first order-md-first order-lg-2">
54 <div id="masthead"><h1>[% LibraryName | html %] Self checkout system</h1></div>
56 [% IF ( impossible ) %]<!-- We tried to issue, but failed. -->
57 <div class="alert alert-warning">
58 <span class="sco-alert-warning noissue"></span>
59 <h2>Item cannot be checked out.</h2>
60 <p>Sorry, this item cannot be checked out at this station.</p>
62 <p>Title: <em>[% title | html %]</em> </p>
66 [% IF ( circ_error_UNKNOWN_BARCODE ) %]
67 <span id="ce_unknown_barcode">The system does not recognize this barcode.</span>
68 [% ELSIF ( circ_error_max_loans_allowed ) %]
69 <span id="ce_max_loans_allowed">You have reached the maximum limit of items checked out.</span>
70 [% ELSIF ( circ_error_ISSUED_TO_ANOTHER ) %]
71 <span id="ce_issued_to_another">This item is checked out to someone else.</span>
72 [% ELSIF ( circ_error_NO_MORE_RENEWALS ) %]
73 <span id="ce_no_more_renewals">You cannot renew this item again.</span>
74 [% ELSIF ( circ_error_NOT_FOR_LOAN ) %]
75 <span id="ce_not_for_loan">This item is not for loan.</span>
76 [% ELSIF ( circ_error_DEBT ) %]
77 <span id="ce_too_much_debt">You owe the library [% DEBT | $Price with_symbol => 1%] and cannot check out.</span>
78 [% ELSIF ( circ_error_WTHDRAWN ) %]
79 <span id="ce_wthdrawn">This item has been withdrawn from the collection.</span>
80 [% ELSIF ( circ_error_RESTRICTED ) %]
81 <span id="ce_restricted">This item is restricted.</span>
82 [% ELSIF ( circ_error_RESERVED ) %]
83 <span id="ce_reserved">This item is on hold for another patron.</span>
84 [% ELSIF ( circ_error_ITEMNOTSAMEBRANCH ) %]
85 <span id="ce_itemnotsamebranch">This item belongs to another library.</span>
86 [% ELSIF ( circ_error_EXPIRED ) %]
87 <span id="ce_expired">Your account has expired.</span>
88 [% ELSIF ( circ_error_DEBARRED ) %]
89 <span id="ce_debarred">Your account has been suspended.</span>
90 [% ELSIF ( circ_error_CARD_LOST ) %]
91 <span id="ce_card_lost">This library card has been declared lost.</span>
92 [% ELSIF ( circ_error_GNA ) %]
93 <span id="ce_gna">Your contact information seems to be incomplete.</span>
94 [% ELSIF ( circ_error_INVALID_DATE ) %]
95 <span id="ce_invalid_date">Due date is not valid.</span>
96 [% ELSIF ( circ_error_ADDITIONAL_MATERIALS ) %]
97 <span id="ce_addtional_materials">Item must be checked out at a circulation desk.</span>
99 <span id ="ce_see_staff">Please see a member of the library staff.</span>
102 [% IF ( returnitem && Koha.Preference('SCOAllowCheckin') ) %]
103 <form action="/cgi-bin/koha/sco/sco-main.pl" name="errorForm" class="inline" method="post">
104 <legend class="sr-only">Return</legend>
105 <input type="hidden" name="op" value="returnbook" />
106 <input type="hidden" name="patronid" value="[% patronid | html %]" />
107 <input type="hidden" name="barcode" value="[% barcode | html %]" />
108 <input type="hidden" name="newissues" value="[% newissues | html %]" />
109 <button type="submit" name="returnbook" class="btn btn-primary"><i class="fa fa-undo" aria-hidden="true"></i> Return this item</button>
113 <form action="/cgi-bin/koha/sco/sco-main.pl" name="errorForm" class="inline" method="post">
114 <legend class="sr-only">Error</legend>
115 <input type="hidden" name="op" value="" />
116 <input type="hidden" name="patronid" value="[% patronid | html %]" />
117 <input type="hidden" name="barcode" value="[% barcode | html %]" />
118 <input type="hidden" name="newissues" value="[% newissues | html %]" />
119 <input type="submit" name= "confirm" value="Return to account summary" class="btn btn-info back focus" />
121 </div> <!-- / .alert -->
122 [% END # / IF ( impossible %]
124 [% IF ( confirm ) %]<!-- We need to confirm the issue.. -->
125 <div class="alert alert-warning"><h2>Please confirm the checkout:</h2>
126 <span class="sco-alert-warning confirm"></span>
127 [% IF ( confirm_renew_issue ) %]
128 <p>This item is already checked out to you.</p>
131 [% IF ( renew && Koha.Preference('SCOAllowCheckin') ) %]
132 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
133 <legend class="sr-only">Return</legend>
134 <input type="hidden" name="op" value="returnbook" />
135 <input type="hidden" name="patronid" value="[% patronid | html %]" />
136 <input type="hidden" name="barcode" value="[% barcode | html %]" />
137 <input type="hidden" name="confirmed" value="" />
138 <input type="hidden" name="newissues" value="[% newissues | html %]" />
139 <button type="submit" name="returnbook" class="btn btn-primary"><i class="fa fa-undo" aria-hidden="true"></i> Return this item</button>
143 [% UNLESS ( renew ) %]
144 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
145 <legend class="sr-only">Renew</legend>
146 <input type="hidden" name="op" value="renew" />
147 <input type="hidden" name="patronid" value="[% patronid | html %]" />
148 <input type="hidden" name="barcode" value="[% barcode | html %]" />
149 <input type="hidden" name="confirmed" value="1" />
150 <input type="hidden" name="newissues" value="[% newissues | html %]" />
151 <button type="submit" name="confirm" class="btn btn-primary"><i class="fa-solid fa-rotate" aria-hidden="true"></i> Renew item</button>
154 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
155 <legend class="sr-only">Renew</legend>
156 <input type="hidden" name="op" value="renew" />
157 <input type="hidden" name="patronid" value="[% patronid | html %]" />
158 <input type="hidden" name="barcode" value="[% barcode | html %]" />
159 <input type="hidden" name="confirmed" value="1" />
160 <input type="hidden" name="newissues" value="[% newissues | html %]" />
161 <button type="submit" class="btn btn-primary"><i class="fa-solid fa-rotate" aria-hidden="true"></i> Renew item</button>
165 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
166 <legend class="sr-only">Cancel</legend>
167 <input type="hidden" name="op" value="" />
168 <input type="hidden" name="patronid" value="[% patronid | html %]" />
169 <input type="hidden" name="newissues" value="[% newissues | html %]" />
170 <button type="submit" class="btn btn-primary"><i class="fa fa-cancel" aria-hidden="true"></i> Cancel</button>
173 [% END # / IF confirm %]
175 [% IF ( nopermission ) %]
176 <!-- This is what is displayed if user doesn't have permission -->
177 <div class="alert alert-warning">
178 <span class="sco-alert-warning nopermission"></span>
179 <h2>Access denied</h2>
180 <p>Sorry, this self-checkout station has lost authentication. Please contact the administrator to resolve this problem.</p>
184 [% IF ( different_ip ) %]
185 <!-- This is what is displayed if user doesn't have permission -->
186 <div class="alert alert-warning">
187 <span class="sco-alert-warning sessionlost"></span>
188 <h2>Session lost</h2>
189 <p>You are accessing self-checkout from a different IP address! please log in again.</p>
193 [% IF ( invalid_username_or_password ) %]
194 <!-- This is what is displayed if user doesn't have permission -->
195 <div class="alert alert-warning">
196 <span class="sco-alert-warning notfound"></span>
197 <h2>Record not found</h2>
198 <p>Your userid was not found in the database. Please try again.</p>
203 <span class="sco-alert-success issue"></span>
204 <div class="alert alert-info">
205 <p>Item checked out</p>
207 [% ELSIF ( renewed ) %]
208 <span class="sco-alert-success renew"></span>
209 <div class="alert alert-info">
212 [% ELSIF ( renewed == 0) %]
213 <span class="sco-alert-warning renew"></span>
214 <div class="alert alert-info">
215 <p>Item not renewed</p>
217 [% ELSIF ( returned == 0 ) %]
218 <span class="sco-alert-warning return"></span>
219 <div class="alert alert-info">
220 <p>Item not checked in: please see circulation staff for assistance</p>
222 [% ELSIF ( returned == 1 ) %]
223 <span class="sco-alert-success return"></span>
224 <div class="alert alert-info">
225 <p>Item checked in</p>
230 [% UNLESS ( hide_main ) %]
232 [% IF ( patronid ) %]
233 [% IF ( validuser ) %]
234 <div class="alert alert-info">You are logged in as [% borrowername | html %].</div>
235 [% INCLUDE 'opac-note.inc' %]
236 [% IF patron_has_hold_fee %]
237 <div class="alert alert-warning">A hold fee was charged to your account for collecting this item.</div>
242 <div class="alert alert-warning">
244 <p>The userid <strong>[% patronid | html %]</strong> was not found in the database. Please try again.</p>
247 [% END # / IF patronid %]
249 [% IF ( validuser ) %]
250 <div id="newcheckout" class="sco_entry">
251 <form id="scan_form" name="scan_form" method="post" action="/cgi-bin/koha/sco/sco-main.pl" onsubmit="return checkout_confirm('[% patronid | html %]');">
253 [% IF ( Koha.Preference('SCOAllowCheckin') ) %]
254 <span>Check out, return, or renew an item:</span>
256 <span>Check out or renew an item:</span>
261 <label for="barcode">Scan a new item or enter its barcode:</label>
264 <input id="barcode" name="barcode" size="20" type="text" class="focus form-control" autocomplete="off" />
266 <div class="col-auto">
267 <button type="submit" class="btn btn-primary">Submit</button>
269 <div class="col ml-auto">
270 <button type="button" id="logout_form" class="btn btn-info"><i class="fa fa-check" aria-hidden="true"></i> Finish</button>
271 <input type="hidden" name="op" value="checkout" />
272 <input type="hidden" name="patronid" value="[% patronid | html %]" />
273 <input type="hidden" name="newissues" value="[% newissues | html %]" />
275 </div> <!-- /.row -->
276 </form> <!-- /#scan_form -->
277 </div> <!-- / #newcheckout -->
278 </div> <!-- / .span12/12 -->
279 [% IF ( display_patron_image ) %]
280 <div class="col-lg-2">
281 <img src="/cgi-bin/koha/sco/sco-patron-image.pl?borrowernumber=[% borrowernumber | uri %]&csrf_token=[% csrf_token | uri %]" alt="" />
284 </div> <!-- / .row -->
285 </div> <!-- / .container-fluid -->
287 <div class="container-fluid">
289 <div class="col order-first order-md-first order-lg-2">
290 <ul class="nav nav-tabs" role="tablist">
291 <li class="nav-item" role="presentation">
292 <a class="nav-link active" href="#checkouts-tab" id="checkouts" aria-controls="home" aria-selected="true" data-toggle="tab">Checkouts ([% issues_count | html %])</a>
294 <li class="nav-item" role="presentation">
295 <a class="nav-link" href="#holds-tab" id="holds" aria-controls="home" aria-selected="false" data-toggle="tab">
296 [% IF waiting_holds_count %]
297 <i class="fa fa-exclamation" aria-hidden="true"></i>
299 Holds ([% HOLDS.count | html %])
302 <li class="nav-item" role="presentation">
303 <a class="nav-link" href="#account-tab" id="account" aria-controls="home" aria-selected="false" data-toggle="tab">Charges ([% total | $Price %])</a>
306 <div class="tab-content">
307 <div id="checkouts-tab" class="tab-pane show active" aria-labelledby="checkouts">
308 <div id="borrowerdetails">
309 [% IF ( issues_count ) %]
310 <table id="loanTable" class="table table-bordered table-striped">
311 <caption>Checkouts for [% borrowername | html %] <span class="count">([% issues_count | html %] total)</span></caption>
312 <!-- ISSUES TABLE ROWS -->
315 <th class="noshow">Checked out on</th>
316 <th class="anti-the">Title</th>
319 <th class="nosort">Renew</th>
320 [% UNLESS ( nofines ) %]
326 [% FOREACH ISSUE IN ISSUES %]
328 <td>[% ISSUE.issuedate | html %]</td>
330 [% UNLESS ( noitemlinks ) %]
331 <a href="/cgi-bin/koha/opac-detail.pl?bib=[% ISSUE. biblionumber | uri %]">[% ISSUE.title | html %]</a>
333 <strong>[% ISSUE.title | html %]</strong>
335 [% IF ( newissues.match(ISSUE.barcode)) %]
336 <span class="label label-info">NEW</span>
338 <span class="item-details">[% ISSUE.author | html %]</span>
339 ([% ISSUE.barcode | html %])
341 <td>[% ISSUE.itemcallnumber | html %]</td>
342 [% IF ( ISSUE.overdue ) %]
343 <td class="overdue" data-order="[% ISSUE.date_due | html %]">
344 [% ISSUE.date_due | $KohaDates as_due_date => 1 %]
347 <td data-order="[% ISSUE.date_due | html %]">
348 [% ISSUE.date_due | $KohaDates as_due_date => 1 %]
352 <form action="/cgi-bin/koha/sco/sco-main.pl" method="post">
353 <legend class="sr-only">Issue renews</legend>
354 <input type="hidden" name="patronid" value="[% patronid | html %]" />
355 <input type="hidden" name="barcode" value="[% ISSUE.barcode | html %]" />
356 <input type="hidden" name="newissues" value="[% newissues | html %]" />
357 [% IF ISSUE.can_be_renewed %]
358 <input type="hidden" name="op" value="renew" />
359 <input type="hidden" name="confirmed" value="1" />
360 [% UNLESS ( ISSUE.renew ) %]
361 <input type="submit" value="Renew item" name="confirm " class="btn btn-primary btn-sm renew" />
363 <input type="submit" value="Renew item" class="btn btn-primary btn-sm renew" />
366 [% IF ISSUE.renew_error == 'auto_renew' OR ISSUE.renew_error == 'auto_too_soon' %]
367 <span>This item has been scheduled for automatic renewal and cannot be renewed</span>
368 [% ELSIF ISSUE.renew_error == 'onsite_checkout' %]
369 <span>This is a on-site checkout, it cannot be renewed.</span>
370 [% ELSIF ISSUE.renew_error == 'too_unseen' %]
371 <span>You have renewed this item the maximum number of consecutive times without it being seen by the library.</span>
372 [% ELSIF ISSUE.renew_error == 'too_soon' %]
373 <span>This item cannot yet be renewed.</span>
375 <span>No renewals allowed</span>
377 [% IF Koha.Preference('SCOAllowCheckin') %]
378 <input type="submit" value="Check in item" name="confirm" class="btn btn-info btn-sm return" />
379 <input type="hidden" name="op" value="returnbook" />
380 <input type="hidden" name="confirmed" value="" />
385 [% UNLESS ( nofines ) %]
387 [% IF ( ISSUE.charges ) %]Yes[% ELSE %]No[% END %]
391 [% END # / FOREACH ISSUE %]
395 <h3>You currently have nothing checked out.</h3>
396 [% END # / IF issues_count %]
397 </div> <!-- / #borrowerdetails -->
399 <div id="holds-tab" class="tab-pane" role="tabpanel" aria-labelledby="holds">
400 [% IF HOLDS.count > 0 %]
401 [% PROCESS 'holds-table.inc' HOLDS = HOLDS, SuspendHoldsOpac = SuspendHoldsOpac, showpriority = showpriority, AutoResumeSuspendedHolds = AutoResumeSuspendedHolds, onlyinfo = 'true' %]
403 <h3>You currently have no pending holds.</h3>
406 <div id="account-tab" class="tab-pane" role="tabpanel" aria-labelledby="account">
407 [% PROCESS 'account-table.inc' %]
410 [% ELSE # IF validuser %]
411 <div class="sco_entry" >
412 <form id="mainform" action="/cgi-bin/koha/sco/sco-main.pl" name="mainform" method="post">
414 [% IF ( Koha.Preference('SelfCheckoutByLogin') ) %]
415 <legend>Log in to your account</legend>
416 <label for="patronlogin">Login:</label>
417 <input type="text" id="patronlogin" class="focus noEnterSubmit" size="20" name="patronlogin" autocomplete="off"/>
418 <label for="patronpw">Password:</label>
419 <input type="password" id="patronpw" size="20" name="patronpw" autocomplete="off"/>
420 <fieldset class="action">
421 <button type="submit" class="btn btn-primary">Log in</button>
424 <div class="form-row">
425 <div class="col-auto">
426 <label for="patronid">Please enter your card number:</label>
429 <input type="text" id="patronid" class="form-control focus" size="20" name="patronid" autocomplete="off" />
431 <div class="col-auto">
432 <button type="submit" class="btn btn-primary">Submit</button>
434 </div> <!-- /.form-row -->
437 [% FOREACH INPUT IN INPUTS %]
438 <input type="hidden" name="[% INPUT.name | html %]" value="[% INPUT.value | html %]">
440 <input type="hidden" name="op" value="login" />
443 </div> <!-- / .sco_entry -->
444 [% END # / IF validuser %]
445 [% END # / UNLESS ( hide_main %]
446 [% IF ( Koha.Preference('SCOMainUserBlock' ) ) %]<div id="scomainuserblock">[% Koha.Preference('SCOMainUserBlock' ) | $raw %]</div>[% END %]
447 </div> <!-- / .span12 -->
448 </div> <!-- / .row -->
449 </div> <!-- / .container-fluid -->
450 </div> <!-- / .main -->
451 <span id="audio-alert"></span>
453 [% INCLUDE 'opac-bottom.inc' %]
454 [% BLOCK jsinclude %]
455 [% INCLUDE 'datatables.inc' %]
457 function mungeHistory() {
458 // prevent back button from allowing form resubmission
459 if (history && history.pushState) {
460 history.replaceState(null, document.title, window.location.href);
464 function sco_init() {
465 mainTimeout = setTimeout(function() {
466 location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout';
467 }, [% SelfCheckTimeout | html %]);
469 function dofocus() { // named function req'd for body onload event by some FF and IE7 security models
470 // alert("dofocus called");
471 $(".focus:last").select();
473 var slip_re = /slip/;
474 function printx_window(print_type) {
475 var handler = print_type.match(slip_re) ? "printslip" : "moremember";
479 function checkout_confirm(patronid) {
480 var barcode = $("#barcode").val();
481 // alert("checkout_confirm('" + patronid + "') called for barcode '" + barcode + "'");
482 if (! barcode) { dofocus(); return false; } // no barcode
483 if (barcode == "__KOHA_NEW_CIRC__") { // magic barcode
484 window.location.href='/cgi-bin/koha/sco/sco-main.pl?op=logout';
489 [% IF Koha.Preference('AudioAlerts') %]
490 var AUDIO_ALERTS = JSON.parse( "[% To.json(AudioAlerts.AudioAlerts) | $raw %]" );
491 $( document ).ready(function() {
492 if ( AUDIO_ALERTS ) {
493 for ( var k in AUDIO_ALERTS ) {
494 var alert = AUDIO_ALERTS[k];
495 if ( $( alert.selector ).length ) {
496 playSound( alert.sound );
502 function playSound( sound ) {
503 if ( ( sound.indexOf('http://') == 0 || sound.indexOf('https://') == 0 ) ) {
504 document.getElementById("audio-alert").innerHTML = '<audio src="' + sound + '" autoplay="autoplay" autobuffer="autobuffer"></audio>';
510 $(document).ready(function() {
512 [% IF ( patronid ) %]sco_init();[% END %]
513 $("#loanTable").dataTable($.extend(true, {}, dataTablesDefaults, {
517 { "targets": [ "nosort" ], "sortable": false, "searchable": false },
518 { "targets": [ "noshow" ], "visible": false, "searchable": false },
519 { "type": "anti-the", "targets" : [ "anti-the" ] }
523 $("#logout_form").on("click", function(e){
525 clearTimeout(mainTimeout);
526 [% IF Koha.Preference('SelfCheckReceiptPrompt') %]
527 var confirmStart = Date.now();
528 confirmModal("", _("Would you like to print a receipt?"), _("Print receipt and end session"), _("End session"), function(result) {
529 if ( result && (Date.now() - confirmStart) < [% SelfCheckTimeout | html %] ) {
530 var win = window.open("/cgi-bin/koha/sco/printslip.pl?print=qslip");
531 location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout';
533 location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout';
538 location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout';
547 [% IF ( Koha.Preference('SCOUserJS') ) %]<script>[% Koha.Preference('SCOUserJS') | $raw %]</script>[% END %]