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/font-awesome/css/font-awesome.min.css") | $raw %]
19 [% Asset.css("css/sco-rtl.css") | $raw %]
21 [% Asset.css("css/sco.css") | $raw %]
23 [% IF ( Koha.Preference('OPACUserCSS') ) %]<style>[% Koha.Preference('OPACUserCSS') | $raw %]</style>[% END %]
24 [% IF ( Koha.Preference('SCOUserCSS') ) %]<style>[% Koha.Preference('SCOUserCSS') | $raw %]</style>[% END %]
27 function _(s) { return s } // dummy function for gettext
29 [% IF lang && lang != 'en' %]
30 [% Asset.js(lang _ '/js/locale_data.js') | $raw %]
32 [% Asset.js('js/Gettext.js') | $raw %]
33 [% Asset.js('js/i18n.js') | $raw %]
35 <body id="sco_main" class="sco" onload="dofocus();" onunload="mungeHistory();">
36 [% INCLUDE 'masthead-sco.inc' %]
39 <div class="container-fluid">
41 [% IF ( display_patron_image ) %]
42 <div class="col-10 order-first order-md-first order-lg-2">
44 <div class="col order-first order-md-first order-lg-2">
47 <div id="masthead"><h1>[% LibraryName | html %] Self checkout system</h1></div>
49 [% IF ( impossible ) %]<!-- We tried to issue, but failed. -->
50 <div class="alert alert-warning">
51 <span class="sco-alert-warning noissue"></span>
52 <h2>Item cannot be checked out.</h2>
53 <p>Sorry, this item cannot be checked out at this station.</p>
55 <p>Title: <em>[% title | html %]</em> </p>
59 [% IF ( circ_error_UNKNOWN_BARCODE ) %]
60 <span id="ce_unknown_barcode">The system does not recognize this barcode.</span>
61 [% ELSIF ( circ_error_max_loans_allowed ) %]
62 <span id="ce_max_loans_allowed">You have reached the maximum limit of items checked out.</span>
63 [% ELSIF ( circ_error_ISSUED_TO_ANOTHER ) %]
64 <span id="ce_issued_to_another">This item is checked out to someone else.</span>
65 [% ELSIF ( circ_error_NO_MORE_RENEWALS ) %]
66 <span id="ce_no_more_renewals">You cannot renew this item again.</span>
67 [% ELSIF ( circ_error_NOT_FOR_LOAN ) %]
68 <span id="ce_not_for_loan">This item is not for loan.</span>
69 [% ELSIF ( circ_error_DEBT ) %]
70 <span id="ce_too_much_debt">You owe the library [% DEBT | $Price with_symbol => 1%] and cannot check out.</span>
71 [% ELSIF ( circ_error_WTHDRAWN ) %]
72 <span id="ce_wthdrawn">This item has been withdrawn from the collection.</span>
73 [% ELSIF ( circ_error_RESTRICTED ) %]
74 <span id="ce_restricted">This item is restricted.</span>
75 [% ELSIF ( circ_error_RESERVED ) %]
76 <span id="ce_reserved">This item is on hold for another patron.</span>
77 [% ELSIF ( circ_error_ITEMNOTSAMEBRANCH ) %]
78 <span id="ce_itemnotsamebranch">This item belongs to another library.</span>
79 [% ELSIF ( circ_error_EXPIRED ) %]
80 <span id="ce_expired">Your account has expired.</span>
81 [% ELSIF ( circ_error_DEBARRED ) %]
82 <span id="ce_debarred">Your account has been suspended.</span>
83 [% ELSIF ( circ_error_CARD_LOST ) %]
84 <span id="ce_card_lost">This library card has been declared lost.</span>
85 [% ELSIF ( circ_error_GNA ) %]
86 <span id="ce_gna">Your contact information seems to be incomplete.</span>
87 [% ELSIF ( circ_error_INVALID_DATE ) %]
88 <span id="ce_invalid_date">Due date is not valid.</span>
89 [% ELSIF ( circ_error_ADDITIONAL_MATERIALS ) %]
90 <span id="ce_addtional_materials">Item must be checked out at a circulation desk.</span>
92 <span id ="ce_see_staff">Please see a member of the library staff.</span>
95 [% IF ( returnitem && Koha.Preference('SCOAllowCheckin') ) %]
96 <form action="/cgi-bin/koha/sco/sco-main.pl" name="errorForm" class="inline" method="post">
97 <legend class="sr-only">Return</legend>
98 <input type="hidden" name="op" value="returnbook" />
99 <input type="hidden" name="patronid" value="[% patronid | html %]" />
100 <input type="hidden" name="barcode" value="[% barcode | html %]" />
101 <input type="hidden" name="newissues" value="[% newissues | html %]" />
102 <button type="submit" name="returnbook" class="btn btn-primary"><i class="fa fa-undo" aria-hidden="true"></i> Return this item</button>
106 <form action="/cgi-bin/koha/sco/sco-main.pl" name="errorForm" class="inline" method="post">
107 <legend class="sr-only">Error</legend>
108 <input type="hidden" name="op" value="" />
109 <input type="hidden" name="patronid" value="[% patronid | html %]" />
110 <input type="hidden" name="barcode" value="[% barcode | html %]" />
111 <input type="hidden" name="newissues" value="[% newissues | html %]" />
112 <input type="submit" name= "confirm" value="Return to account summary" class="btn btn-info back focus" />
114 </div> <!-- / .alert -->
115 [% END # / IF ( impossible %]
117 [% IF ( confirm ) %]<!-- We need to confirm the issue.. -->
118 <div class="alert alert-warning"><h2>Please confirm the checkout:</h2>
119 <span class="sco-alert-warning confirm"></span>
120 [% IF ( confirm_renew_issue ) %]
121 <p>This item is already checked out to you.</p>
124 [% IF ( renew && Koha.Preference('SCOAllowCheckin') ) %]
125 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
126 <legend class="sr-only">Return</legend>
127 <input type="hidden" name="op" value="returnbook" />
128 <input type="hidden" name="patronid" value="[% patronid | html %]" />
129 <input type="hidden" name="barcode" value="[% barcode | html %]" />
130 <input type="hidden" name="confirmed" value="" />
131 <input type="hidden" name="newissues" value="[% newissues | html %]" />
132 <button type="submit" name="returnbook" class="btn btn-primary"><i class="fa fa-undo" aria-hidden="true"></i> Return this item</button>
136 [% UNLESS ( renew ) %]
137 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
138 <legend class="sr-only">Renew</legend>
139 <input type="hidden" name="op" value="renew" />
140 <input type="hidden" name="patronid" value="[% patronid | html %]" />
141 <input type="hidden" name="barcode" value="[% barcode | html %]" />
142 <input type="hidden" name="confirmed" value="1" />
143 <input type="hidden" name="newissues" value="[% newissues | html %]" />
144 <button type="submit" name="confirm" class="btn btn-primary"><i class="fa fa-refresh" aria-hidden="true"></i> Renew item</button>
147 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
148 <legend class="sr-only">Renew</legend>
149 <input type="hidden" name="op" value="renew" />
150 <input type="hidden" name="patronid" value="[% patronid | html %]" />
151 <input type="hidden" name="barcode" value="[% barcode | html %]" />
152 <input type="hidden" name="confirmed" value="1" />
153 <input type="hidden" name="newissues" value="[% newissues | html %]" />
154 <button type="submit" class="btn btn-primary"><i class="fa fa-refresh" aria-hidden="true"></i> Renew item</button>
158 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
159 <legend class="sr-only">Cancel</legend>
160 <input type="hidden" name="op" value="" />
161 <input type="hidden" name="patronid" value="[% patronid | html %]" />
162 <input type="hidden" name="newissues" value="[% newissues | html %]" />
163 <button type="submit" class="btn btn-primary"><i class="fa fa-cancel" aria-hidden="true"></i> Cancel</button>
166 [% END # / IF confirm %]
168 [% IF ( nopermission ) %]
169 <!-- This is what is displayed if user doesn't have permission -->
170 <div class="alert alert-warning">
171 <span class="sco-alert-warning nopermission"></span>
172 <h2>Access denied</h2>
173 <p>Sorry, this self-checkout station has lost authentication. Please contact the administrator to resolve this problem.</p>
177 [% IF ( different_ip ) %]
178 <!-- This is what is displayed if user doesn't have permission -->
179 <div class="alert alert-warning">
180 <span class="sco-alert-warning sessionlost"></span>
181 <h2>Session lost</h2>
182 <p>You are accessing self-checkout from a different IP address! please log in again.</p>
186 [% IF ( invalid_username_or_password ) %]
187 <!-- This is what is displayed if user doesn't have permission -->
188 <div class="alert alert-warning">
189 <span class="sco-alert-warning notfound"></span>
190 <h2>Record not found</h2>
191 <p>Your userid was not found in the database. Please try again.</p>
196 <span class="sco-alert-success issue"></span>
197 <div class="alert alert-info">
198 <p>Item checked out</p>
200 [% ELSIF ( renewed ) %]
201 <span class="sco-alert-success renew"></span>
202 <div class="alert alert-info">
205 [% ELSIF ( renewed == 0) %]
206 <span class="sco-alert-warning renew"></span>
207 <div class="alert alert-info">
208 <p>Item not renewed</p>
210 [% ELSIF ( returned == 0 ) %]
211 <span class="sco-alert-warning return"></span>
212 <div class="alert alert-info">
213 <p>Item not checked in: please see circulation staff for assistance</p>
215 [% ELSIF ( returned == 1 ) %]
216 <span class="sco-alert-success return"></span>
217 <div class="alert alert-info">
218 <p>Item checked in</p>
223 [% UNLESS ( hide_main ) %]
225 [% IF ( patronid ) %]
226 [% IF ( validuser ) %]
227 <div class="alert alert-info">You are logged in as [% borrowername | html %].</div>
228 [% INCLUDE 'opac-note.inc' %]
229 [% IF patron_has_hold_fee %]
230 <div class="alert alert-warning">A hold fee was charged to your account for collecting this item.</div>
235 <div class="alert alert-warning">
237 <p>The userid <strong>[% patronid | html %]</strong> was not found in the database. Please try again.</p>
240 [% END # / IF patronid %]
242 [% IF ( validuser ) %]
243 <div id="newcheckout" class="sco_entry">
244 <form id="scan_form" name="scan_form" method="post" action="/cgi-bin/koha/sco/sco-main.pl" onsubmit="return checkout_confirm('[% patronid | html %]');">
246 [% IF ( Koha.Preference('SCOAllowCheckin') ) %]
247 <span>Check out, return, or renew an item:</span>
249 <span>Check out or renew an item:</span>
254 <label for="barcode">Scan a new item or enter its barcode:</label>
257 <input id="barcode" name="barcode" size="20" type="text" class="focus form-control" autocomplete="off" />
259 <div class="col-auto">
260 <button type="submit" class="btn btn-primary">Submit</button>
262 <div class="col ml-auto">
263 <button type="button" id="logout_form" class="btn btn-info"><i class="fa fa-check" aria-hidden="true"></i> Finish</button>
264 <input type="hidden" name="op" value="checkout" />
265 <input type="hidden" name="patronid" value="[% patronid | html %]" />
266 <input type="hidden" name="newissues" value="[% newissues | html %]" />
268 </div> <!-- /.row -->
269 </form> <!-- /#scan_form -->
270 </div> <!-- / #newcheckout -->
271 </div> <!-- / .span12/12 -->
272 [% IF ( display_patron_image ) %]
273 <div class="col-lg-2">
274 <img src="/cgi-bin/koha/sco/sco-patron-image.pl?borrowernumber=[% borrowernumber | uri %]&csrf_token=[% csrf_token | uri %]" alt="" />
277 </div> <!-- / .row -->
278 </div> <!-- / .container-fluid -->
280 <div class="container-fluid">
282 <div class="col order-first order-md-first order-lg-2">
283 <ul class="nav nav-tabs" role="tablist">
284 <li class="nav-item" role="presentation">
285 <a class="nav-link active" href="#checkouts-tab" id="checkouts" aria-controls="home" aria-selected="true" data-toggle="tab">Checkouts ([% issues_count | html %])</a>
287 <li class="nav-item" role="presentation">
288 <a class="nav-link" href="#holds-tab" id="holds" aria-controls="home" aria-selected="false" data-toggle="tab">
289 [% IF waiting_holds_count %]
290 <i class="fa fa-exclamation" aria-hidden="true"></i>
292 Holds ([% HOLDS.count | html %])
295 <li class="nav-item" role="presentation">
296 <a class="nav-link" href="#account-tab" id="account" aria-controls="home" aria-selected="false" data-toggle="tab">Charges ([% total | $Price %])</a>
299 <div class="tab-content">
300 <div id="checkouts-tab" class="tab-pane show active" aria-labelledby="checkouts">
301 <div id="borrowerdetails">
302 [% IF ( issues_count ) %]
303 <table id="loanTable" class="table table-bordered table-striped">
304 <caption>Checkouts for [% borrowername | html %] <span class="count">([% issues_count | html %] total)</span></caption>
305 <!-- ISSUES TABLE ROWS -->
308 <th class="noshow">Checked out on</th>
309 <th class="anti-the">Title</th>
312 <th class="nosort">Renew</th>
313 [% UNLESS ( nofines ) %]
319 [% FOREACH ISSUE IN ISSUES %]
321 <td>[% ISSUE.issuedate | html %]</td>
323 [% UNLESS ( noitemlinks ) %]
324 <a href="/cgi-bin/koha/opac-detail.pl?bib=[% ISSUE. biblionumber | uri %]">[% ISSUE.title | html %]</a>
326 <strong>[% ISSUE.title | html %]</strong>
328 [% IF ( newissues.match(ISSUE.barcode)) %]
329 <span class="label label-info">NEW</span>
331 <span class="item-details">[% ISSUE.author | html %]</span>
332 ([% ISSUE.barcode | html %])
334 <td>[% ISSUE.itemcallnumber | html %]</td>
335 [% IF ( ISSUE.overdue ) %]
336 <td class="overdue" data-order="[% ISSUE.date_due | html %]">
337 [% ISSUE.date_due | $KohaDates as_due_date => 1 %]
340 <td data-order="[% ISSUE.date_due | html %]">
341 [% ISSUE.date_due | $KohaDates as_due_date => 1 %]
345 <form action="/cgi-bin/koha/sco/sco-main.pl" method="post">
346 <legend class="sr-only">Issue renews</legend>
347 <input type="hidden" name="patronid" value="[% patronid | html %]" />
348 <input type="hidden" name="barcode" value="[% ISSUE.barcode | html %]" />
349 <input type="hidden" name="newissues" value="[% newissues | html %]" />
350 [% IF ISSUE.can_be_renewed %]
351 <input type="hidden" name="op" value="renew" />
352 <input type="hidden" name="confirmed" value="1" />
353 [% UNLESS ( ISSUE.renew ) %]
354 <input type="submit" value="Renew item" name="confirm " class="btn btn-primary btn-sm renew" />
356 <input type="submit" value="Renew item" class="btn btn-primary btn-sm renew" />
359 [% IF ISSUE.renew_error == 'auto_renew' OR ISSUE.renew_error == 'auto_too_soon' %]
360 <span>This item has been scheduled for automatic renewal and cannot be renewed</span>
361 [% ELSIF ISSUE.renew_error == 'onsite_checkout' %]
362 <span>This is a on-site checkout, it cannot be renewed.</span>
363 [% ELSIF ISSUE.renew_error == 'too_unseen' %]
364 <span>You have renewed this item the maximum number of consecutive times without it being seen by the library.</span>
365 [% ELSIF ISSUE.renew_error == 'too_soon' %]
366 <span>This item cannot yet be renewed.</span>
368 <span>No renewals allowed</span>
370 [% IF Koha.Preference('SCOAllowCheckin') %]
371 <input type="submit" value="Check in item" name="confirm" class="btn btn-info btn-sm return" />
372 <input type="hidden" name="op" value="returnbook" />
373 <input type="hidden" name="confirmed" value="" />
378 [% UNLESS ( nofines ) %]
380 [% IF ( ISSUE.charges ) %]Yes[% ELSE %]No[% END %]
384 [% END # / FOREACH ISSUE %]
388 <h3>You currently have nothing checked out.</h3>
389 [% END # / IF issues_count %]
390 </div> <!-- / #borrowerdetails -->
392 <div id="holds-tab" class="tab-pane" role="tabpanel" aria-labelledby="holds">
393 [% IF HOLDS.count > 0 %]
394 [% PROCESS 'holds-table.inc' HOLDS = HOLDS, SuspendHoldsOpac = SuspendHoldsOpac, showpriority = showpriority, AutoResumeSuspendedHolds = AutoResumeSuspendedHolds, onlyinfo = 'true' %]
396 <h3>You currently have no pending holds.</h3>
399 <div id="account-tab" class="tab-pane" role="tabpanel" aria-labelledby="account">
400 [% PROCESS 'account-table.inc' %]
403 [% ELSE # IF validuser %]
404 <div class="sco_entry" >
405 <form id="mainform" action="/cgi-bin/koha/sco/sco-main.pl" name="mainform" method="post">
407 [% IF ( Koha.Preference('SelfCheckoutByLogin') ) %]
408 <legend>Log in to your account</legend>
409 <label for="patronlogin">Login:</label>
410 <input type="text" id="patronlogin" class="focus noEnterSubmit" size="20" name="patronlogin" autocomplete="off"/>
411 <label for="patronpw">Password:</label>
412 <input type="password" id="patronpw" size="20" name="patronpw" autocomplete="off"/>
413 <fieldset class="action">
414 <button type="submit" class="btn btn-primary">Log in</button>
417 <div class="form-row">
418 <div class="col-auto">
419 <label for="patronid">Please enter your card number:</label>
422 <input type="text" id="patronid" class="form-control focus" size="20" name="patronid" autocomplete="off" />
424 <div class="col-auto">
425 <button type="submit" class="btn btn-primary">Submit</button>
427 </div> <!-- /.form-row -->
430 [% FOREACH INPUT IN INPUTS %]
431 <input type="hidden" name="[% INPUT.name | html %]" value="[% INPUT.value | html %]">
433 <input type="hidden" name="op" value="login" />
436 </div> <!-- / .sco_entry -->
437 [% END # / IF validuser %]
438 [% END # / UNLESS ( hide_main %]
439 [% IF ( Koha.Preference('SCOMainUserBlock' ) ) %]<div id="scomainuserblock">[% Koha.Preference('SCOMainUserBlock' ) | $raw %]</div>[% END %]
440 </div> <!-- / .span12 -->
441 </div> <!-- / .row -->
442 </div> <!-- / .container-fluid -->
443 </div> <!-- / .main -->
444 <span id="audio-alert"></span>
446 [% INCLUDE 'opac-bottom.inc' %]
447 [% BLOCK jsinclude %]
448 [% INCLUDE 'datatables.inc' %]
450 function mungeHistory() {
451 // prevent back button from allowing form resubmission
452 if (history && history.pushState) {
453 history.replaceState(null, document.title, window.location.href);
457 function sco_init() {
458 mainTimeout = setTimeout(function() {
459 location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout';
460 }, [% SelfCheckTimeout | html %]);
462 function dofocus() { // named function req'd for body onload event by some FF and IE7 security models
463 // alert("dofocus called");
464 $(".focus:last").select();
466 var slip_re = /slip/;
467 function printx_window(print_type) {
468 var handler = print_type.match(slip_re) ? "printslip" : "moremember";
472 function checkout_confirm(patronid) {
473 var barcode = $("#barcode").val();
474 // alert("checkout_confirm('" + patronid + "') called for barcode '" + barcode + "'");
475 if (! barcode) { dofocus(); return false; } // no barcode
476 if (barcode == "__KOHA_NEW_CIRC__") { // magic barcode
477 window.location.href='/cgi-bin/koha/sco/sco-main.pl?op=logout';
482 [% IF Koha.Preference('AudioAlerts') %]
483 var AUDIO_ALERTS = JSON.parse( "[% To.json(AudioAlerts.AudioAlerts) | $raw %]" );
484 $( document ).ready(function() {
485 if ( AUDIO_ALERTS ) {
486 for ( var k in AUDIO_ALERTS ) {
487 var alert = AUDIO_ALERTS[k];
488 if ( $( alert.selector ).length ) {
489 playSound( alert.sound );
495 function playSound( sound ) {
496 if ( ( sound.indexOf('http://') == 0 || sound.indexOf('https://') == 0 ) ) {
497 document.getElementById("audio-alert").innerHTML = '<audio src="' + sound + '" autoplay="autoplay" autobuffer="autobuffer"></audio>';
503 $(document).ready(function() {
505 [% IF ( patronid ) %]sco_init();[% END %]
506 $("#loanTable").dataTable($.extend(true, {}, dataTablesDefaults, {
510 { "targets": [ "nosort" ], "sortable": false, "searchable": false },
511 { "targets": [ "noshow" ], "visible": false, "searchable": false },
512 { "type": "anti-the", "targets" : [ "anti-the" ] }
516 $("#logout_form").on("click", function(e){
518 clearTimeout(mainTimeout);
519 [% IF Koha.Preference('SelfCheckReceiptPrompt') %]
520 var confirmStart = Date.now();
521 confirmModal("", _("Would you like to print a receipt?"), _("Print receipt and end session"), _("End session"), function(result) {
522 if ( result && (Date.now() - confirmStart) < [% SelfCheckTimeout | html %] ) {
523 var win = window.open("/cgi-bin/koha/sco/printslip.pl?print=qslip");
524 location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout';
526 location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout';
530 location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout';
539 [% IF ( Koha.Preference('SCOUserJS') ) %]<script>[% Koha.Preference('SCOUserJS') | $raw %]</script>[% END %]