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("lib/jquery/jquery-ui-rtl-1.12.1.min.css") | $raw %]
20 [% Asset.css("css/sco-rtl.css") | $raw %]
22 [% Asset.css("lib/jquery/jquery-ui-1.12.1.css") | $raw %]
23 [% Asset.css("css/sco.css") | $raw %]
25 [% IF ( Koha.Preference('OPACUserCSS') ) %]<style>[% Koha.Preference('OPACUserCSS') | $raw %]</style>[% END %]
26 [% IF ( Koha.Preference('SCOUserCSS') ) %]<style>[% Koha.Preference('SCOUserCSS') | $raw %]</style>[% END %]
29 function _(s) { return s } // dummy function for gettext
31 [% IF lang && lang != 'en' %]
32 [% Asset.js(lang _ '/js/locale_data.js') | $raw %]
34 [% Asset.js('js/Gettext.js') | $raw %]
35 [% Asset.js('js/i18n.js') | $raw %]
36 [% Asset.js("lib/modernizr.min.js") | $raw %]
38 <body id="sco_main" class="sco" onload="dofocus();" onunload="mungeHistory();">
39 [% INCLUDE 'masthead-sco.inc' %]
42 <div class="container-fluid">
44 [% IF ( display_patron_image ) %]
45 <div class="col-10 order-first order-md-first order-lg-2">
47 <div class="col order-first order-md-first order-lg-2">
50 <div id="masthead"><h1>[% LibraryName | html %] Self checkout system</h1></div>
52 [% IF ( impossible ) %]<!-- We tried to issue, but failed. -->
53 <div class="alert alert-warning">
54 <span class="sco-alert-warning noissue"></span>
55 <h2>Item cannot be checked out.</h2>
56 <p>Sorry, this item cannot be checked out at this station.</p>
58 <p>Title: <em>[% title | html %]</em> </p>
62 [% IF ( circ_error_UNKNOWN_BARCODE ) %]
63 The system does not recognize this barcode.
64 [% ELSIF ( circ_error_max_loans_allowed ) %]
65 You have checked out too many items and can't check out any more.
66 [% ELSIF ( circ_error_ISSUED_TO_ANOTHER ) %]
67 This item is checked out to someone else.
68 [% ELSIF ( circ_error_NO_MORE_RENEWALS ) %]
69 You cannot renew this item again.
70 [% ELSIF ( circ_error_NOT_FOR_LOAN ) %]
71 This item is not for loan.
72 [% ELSIF ( circ_error_DEBT ) %]
73 You owe the library [% DEBT | $Price %] and cannot check out.
74 [% ELSIF ( circ_error_WTHDRAWN ) %]
75 This item has been withdrawn from the collection.
76 [% ELSIF ( circ_error_RESTRICTED ) %]
77 This item is restricted.
78 [% ELSIF ( circ_error_RESERVED ) %]
79 This item is on hold for another patron.
80 [% ELSIF ( circ_error_ITEMNOTSAMEBRANCH ) %]
81 This item belongs to another branch.
82 [% ELSIF ( circ_error_EXPIRED ) %]
83 Your account has expired.
84 [% ELSIF ( circ_error_DEBARRED ) %]
85 Your account has been suspended.
86 [% ELSIF ( circ_error_CARD_LOST ) %]
87 This card has been declared lost.
88 [% ELSIF ( circ_error_GNA ) %]
89 Your contact information seems to be incomplete.
90 [% ELSIF ( circ_error_INVALID_DATE ) %]
91 Due date is not valid.
92 [% ELSIF ( circ_error_ADDITIONAL_MATERIALS ) %]
93 Item must be checked out at a circulation desk.
95 Please see a member of the library staff.
98 [% IF ( returnitem && Koha.Preference('SCOAllowCheckin') ) %]
99 <form action="/cgi-bin/koha/sco/sco-main.pl" name="errorForm" class="inline" method="post">
100 <legend class="sr-only">Return</legend>
101 <input type="hidden" name="op" value="returnbook" />
102 <input type="hidden" name="patronid" value="[% patronid | html %]" />
103 <input type="hidden" name="barcode" value="[% barcode | html %]" />
104 <input type="hidden" name="newissues" value="[% newissues | html %]" />
105 <button type="submit" name="returnbook" class="btn btn-primary"><i class="fa fa-undo" aria-hidden="true"></i> Return this item</button>
109 <form action="/cgi-bin/koha/sco/sco-main.pl" name="errorForm" class="inline" method="post">
110 <legend class="sr-only">Error</legend>
111 <input type="hidden" name="op" value="" />
112 <input type="hidden" name="patronid" value="[% patronid | html %]" />
113 <input type="hidden" name="barcode" value="[% barcode | html %]" />
114 <input type="hidden" name="newissues" value="[% newissues | html %]" />
115 <input type="submit" name= "confirm" value="Return to account summary" class="btn btn-info back focus" />
117 </div> <!-- / .alert -->
118 [% END # / IF ( impossible %]
120 [% IF ( confirm ) %]<!-- We need to confirm the issue.. -->
121 <div class="alert alert-warning"><h2>Please confirm the checkout:</h2>
122 <span class="sco-alert-warning confirm"></span>
123 [% IF ( confirm_renew_issue ) %]
124 <p>This item is already checked out to you.</p>
127 [% IF ( renew && Koha.Preference('SCOAllowCheckin') ) %]
128 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
129 <legend class="sr-only">Return</legend>
130 <input type="hidden" name="op" value="returnbook" />
131 <input type="hidden" name="patronid" value="[% patronid | html %]" />
132 <input type="hidden" name="barcode" value="[% barcode | html %]" />
133 <input type="hidden" name="confirmed" value="" />
134 <input type="hidden" name="newissues" value="[% newissues | html %]" />
135 <button type="submit" name="returnbook" class="btn btn-primary"><i class="fa fa-undo" aria-hidden="true"></i> Return this item</button>
139 [% UNLESS ( renew ) %]
140 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
141 <legend class="sr-only">Renew</legend>
142 <input type="hidden" name="op" value="renew" />
143 <input type="hidden" name="patronid" value="[% patronid | html %]" />
144 <input type="hidden" name="barcode" value="[% barcode | html %]" />
145 <input type="hidden" name="confirmed" value="1" />
146 <input type="hidden" name="newissues" value="[% newissues | html %]" />
147 <button type="submit" name="confirm" class="btn btn-primary"><i class="fa fa-refresh" aria-hidden="true"></i> Renew item</button>
150 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
151 <legend class="sr-only">Renew</legend>
152 <input type="hidden" name="op" value="renew" />
153 <input type="hidden" name="patronid" value="[% patronid | html %]" />
154 <input type="hidden" name="barcode" value="[% barcode | html %]" />
155 <input type="hidden" name="confirmed" value="1" />
156 <input type="hidden" name="newissues" value="[% newissues | html %]" />
157 <button type="submit" class="btn btn-primary"><i class="fa fa-refresh" aria-hidden="true"></i> Renew item</button>
161 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
162 <legend class="sr-only">Cancel</legend>
163 <input type="hidden" name="op" value="" />
164 <input type="hidden" name="patronid" value="[% patronid | html %]" />
165 <input type="hidden" name="newissues" value="[% newissues | html %]" />
166 <button type="submit" class="btn btn-primary"><i class="fa fa-cancel" aria-hidden="true"></i> Cancel</button>
169 [% END # / IF confirm %]
171 [% IF ( nopermission ) %]
172 <!-- This is what is displayed if user doesn't have permission -->
173 <div class="alert alert-warning">
174 <span class="sco-alert-warning nopermission"></span>
175 <h2>Access denied</h2>
176 <p>Sorry, this self-checkout station has lost authentication. Please contact the administrator to resolve this problem.</p>
180 [% IF ( different_ip ) %]
181 <!-- This is what is displayed if user doesn't have permission -->
182 <div class="alert alert-warning">
183 <span class="sco-alert-warning sessionlost"></span>
184 <h2>Session lost</h2>
185 <p>You are accessing self-checkout from a different IP address! please log in again.</p>
189 [% IF ( invalid_username_or_password ) %]
190 <!-- This is what is displayed if user doesn't have permission -->
191 <div class="alert alert-warning">
192 <span class="sco-alert-warning notfound"></span>
193 <h2>Record not found</h2>
194 <p>Your userid was not found in the database. Please try again.</p>
199 <span class="sco-alert-success issue"></span>
200 <div class="alert alert-info">
201 <p>Item checked out</p>
203 [% ELSIF ( renewed ) %]
204 <span class="sco-alert-success renew"></span>
205 <div class="alert alert-info">
208 [% ELSIF ( renewed == 0) %]
209 <span class="sco-alert-warning renew"></span>
210 <div class="alert alert-info">
211 <p>Item not renewed</p>
213 [% ELSIF ( returned == 0 ) %]
214 <span class="sco-alert-warning return"></span>
215 <div class="alert alert-info">
216 <p>Item not checked in: please see circulation staff for assistance</p>
218 [% ELSIF ( returned == 1 ) %]
219 <span class="sco-alert-success return"></span>
220 <div class="alert alert-info">
221 <p>Item checked in</p>
226 [% UNLESS ( hide_main ) %]
228 [% IF ( patronid ) %]
229 [% IF ( validuser ) %]
230 <div class="alert alert-info">You are logged in as [% borrowername | html %].</div>
231 [% INCLUDE 'opac-note.inc' %]
232 [% IF patron_has_hold_fee %]
233 <div class="alert alert-warning">A hold fee was charged to your account for collecting this item.</div>
238 <div class="alert alert-warning">
240 <p>The userid <strong>[% patronid | html %]</strong> was not found in the database. Please try again.</p>
243 [% END # / IF patronid %]
245 [% IF ( validuser ) %]
246 <div id="newcheckout" class="sco_entry">
247 <form id="scan_form" name="scan_form" method="post" action="/cgi-bin/koha/sco/sco-main.pl" onsubmit="return checkout_confirm('[% patronid | html %]');">
249 [% IF ( Koha.Preference('SCOAllowCheckin') ) %]
250 Check out, return, or renew an item:
252 Check out or renew an item:
257 <label for="barcode">Scan a new item or enter its barcode:</label>
260 <input id="barcode" name="barcode" size="20" type="text" class="focus form-control" autocomplete="off" />
262 <div class="col-auto">
263 <button type="submit" class="btn btn-primary">Submit</button>
265 <div class="col ml-auto">
266 <button type="button" id="logout_form" class="btn btn-info"><i class="fa fa-check" aria-hidden="true"></i> Finish</button>
267 <input type="hidden" name="op" value="checkout" />
268 <input type="hidden" name="patronid" value="[% patronid | html %]" />
269 <input type="hidden" name="newissues" value="[% newissues | html %]" />
271 </div> <!-- /.row -->
272 </form> <!-- /#scan_form -->
273 </div> <!-- / #newcheckout -->
274 </div> <!-- / .span12/12 -->
275 [% IF ( display_patron_image ) %]
276 <div class="col-lg-2">
277 <img src="/cgi-bin/koha/sco/sco-patron-image.pl?borrowernumber=[% borrowernumber | uri %]&csrf_token=[% csrf_token | uri %]" alt="" />
280 </div> <!-- / .row -->
281 </div> <!-- / .container-fluid -->
283 <div class="container-fluid">
285 <div class="col order-first order-md-first order-lg-2">
286 <ul class="nav nav-tabs" role="tablist">
287 <li class="nav-item" role="presentation">
288 <a class="nav-link active" href="#checkouts-tab" id="checkouts" aria-controls="home" aria-selected="true" data-toggle="tab">Checkouts ([% issues_count | html %])</a>
290 <li class="nav-item" role="presentation">
291 <a class="nav-link" href="#holds-tab" id="holds" aria-controls="home" aria-selected="false" data-toggle="tab">
292 [% IF waiting_holds_count %]
293 <i class="fa fa-exclamation" aria-hidden="true"></i>
295 Holds ([% HOLDS.count | html %])
298 <li class="nav-item" role="presentation">
299 <a class="nav-link" href="#account-tab" id="account" aria-controls="home" aria-selected="false" data-toggle="tab">Charges ([% total | $Price %])</a>
302 <div class="tab-content">
303 <div id="checkouts-tab" class="tab-pane show active" aria-labelledby="checkouts">
304 <div id="borrowerdetails">
305 [% IF ( issues_count ) %]
306 <table id="loanTable" class="table table-bordered table-striped">
307 <caption>Checkouts for [% borrowername | html %] <span class="count">([% issues_count | html %] total)</span></caption>
308 <!-- ISSUES TABLE ROWS -->
311 <th class="noshow">Checked out on</th>
312 <th class="anti-the">Title</th>
315 <th class="nosort">Renew</th>
316 [% UNLESS ( nofines ) %]
322 [% FOREACH ISSUE IN ISSUES %]
324 <td>[% ISSUE.issuedate | html %]</td>
326 [% UNLESS ( noitemlinks ) %]
327 <a href="/cgi-bin/koha/opac-detail.pl?bib=[% ISSUE. biblionumber | uri %]">[% ISSUE.title | html %]</a>
329 <strong>[% ISSUE.title | html %]</strong>
331 [% IF ( newissues.match(ISSUE.barcode)) %]
332 <span class="label label-info">NEW</span>
334 <span class="item-details">[% ISSUE.author | html %]</span>
335 ([% ISSUE.barcode | html %])
337 <td>[% ISSUE.itemcallnumber | html %]</td>
338 [% IF ( ISSUE.overdue ) %]
339 <td class="overdue" data-order="[% ISSUE.date_due | html %]">
340 [% ISSUE.date_due | $KohaDates as_due_date => 1 %]
343 <td data-order="[% ISSUE.date_due | html %]">
344 [% ISSUE.date_due | $KohaDates as_due_date => 1 %]
348 <form action="/cgi-bin/koha/sco/sco-main.pl" method="post">
349 <legend class="sr-only">Issue renews</legend>
350 <input type="hidden" name="patronid" value="[% patronid | html %]" />
351 <input type="hidden" name="barcode" value="[% ISSUE.barcode | html %]" />
352 <input type="hidden" name="newissues" value="[% newissues | html %]" />
353 [% IF ISSUE.can_be_renewed %]
354 <input type="hidden" name="op" value="renew" />
355 <input type="hidden" name="confirmed" value="1" />
356 [% UNLESS ( ISSUE.renew ) %]
357 <input type="submit" value="Renew item" name="confirm " class="btn btn-primary btn-sm renew" />
359 <input type="submit" value="Renew item" class="btn btn-primary btn-sm renew" />
362 [% IF ISSUE.renew_error == 'auto_renew' OR ISSUE.renew_error == 'auto_too_soon' %]
363 <span>This item has been scheduled for automatic renewal and cannot be renewed</span>
364 [% ELSIF ISSUE.renew_error == 'onsite_checkout' %]
365 <span>This is a on-site checkout, it cannot be renewed.</span>
366 [% ELSIF ISSUE.renew_error == 'too_unseen' %]
367 <span>You have renewed this item the maximum number of consecutive times without it being seen by the library.</span>
369 <span>No renewals allowed</span>
371 [% IF Koha.Preference('SCOAllowCheckin') %]
372 <input type="submit" value="Check in item" name="confirm" class="btn btn-info btn-sm return" />
373 <input type="hidden" name="op" value="returnbook" />
374 <input type="hidden" name="confirmed" value="" />
379 [% UNLESS ( nofines ) %]
381 [% IF ( ISSUE.charges ) %]Yes[% ELSE %]No[% END %]
385 [% END # / FOREACH ISSUE %]
389 <h3>You currently have nothing checked out.</h3>
390 [% END # / IF issues_count %]
391 </div> <!-- / #borrowerdetails -->
393 <div id="holds-tab" class="tab-pane" role="tabpanel" aria-labelledby="holds">
394 [% IF HOLDS.count > 0 %]
395 [% PROCESS 'holds-table.inc' HOLDS = HOLDS, SuspendHoldsOpac = SuspendHoldsOpac, showpriority = showpriority, AutoResumeSuspendedHolds = AutoResumeSuspendedHolds, onlyinfo = 'true' %]
397 <h3>You currently have no pending holds.</h3>
400 <div id="account-tab" class="tab-pane" role="tabpanel" aria-labelledby="account">
401 [% PROCESS 'account-table.inc' %]
404 [% ELSE # IF validuser %]
405 <div class="sco_entry" >
406 <form id="mainform" action="/cgi-bin/koha/sco/sco-main.pl" name="mainform" method="post">
408 [% IF ( Koha.Preference('SelfCheckoutByLogin') ) %]
409 <legend>Log in to your account</legend>
410 <label for="patronlogin">Login:</label>
411 <input type="text" id="patronlogin" class="focus noEnterSubmit" size="20" name="patronlogin" autocomplete="off"/>
412 <label for="patronpw">Password:</label>
413 <input type="password" id="patronpw" size="20" name="patronpw" autocomplete="off"/>
414 <fieldset class="action">
415 <button type="submit" class="btn btn-primary">Log in</button>
418 <div class="form-row">
419 <div class="col-auto">
420 <label for="patronid">Please enter your card number:</label>
423 <input type="text" id="patronid" class="form-control focus" size="20" name="patronid" autocomplete="off" />
425 <div class="col-auto">
426 <button type="submit" class="btn btn-primary">Submit</button>
428 </div> <!-- /.form-row -->
431 [% FOREACH INPUT IN INPUTS %]
432 <input type="hidden" name="[% INPUT.name | html %]" value="[% INPUT.value | html %]">
434 <input type="hidden" name="op" value="login" />
437 </div> <!-- / .sco_entry -->
438 [% END # / IF validuser %]
439 [% END # / UNLESS ( hide_main %]
440 [% IF ( Koha.Preference('SCOMainUserBlock' ) ) %]<div id="scomainuserblock">[% Koha.Preference('SCOMainUserBlock' ) | $raw %]</div>[% END %]
441 </div> <!-- / .span12 -->
442 </div> <!-- / .row -->
443 </div> <!-- / .container-fluid -->
444 </div> <!-- / .main -->
445 <span id="audio-alert"></span>
447 [% INCLUDE 'opac-bottom.inc' %]
448 [% BLOCK jsinclude %]
449 [% INCLUDE 'datatables.inc' %]
451 function mungeHistory() {
452 // prevent back button from allowing form resubmission
453 if (history && history.pushState) {
454 history.replaceState(null, document.title, window.location.href);
458 function sco_init() {
459 mainTimeout = setTimeout(function() {
460 location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout';
461 }, [% SelfCheckTimeout | html %]);
463 function dofocus() { // named function req'd for body onload event by some FF and IE7 security models
464 // alert("dofocus called");
465 $(".focus:last").select();
467 var slip_re = /slip/;
468 function printx_window(print_type) {
469 var handler = print_type.match(slip_re) ? "printslip" : "moremember";
473 function checkout_confirm(patronid) {
474 var barcode = $("#barcode").val();
475 // alert("checkout_confirm('" + patronid + "') called for barcode '" + barcode + "'");
476 if (! barcode) { dofocus(); return false; } // no barcode
477 if (barcode == "__KOHA_NEW_CIRC__") { // magic barcode
478 window.location.href='/cgi-bin/koha/sco/sco-main.pl?op=logout';
483 [% IF Koha.Preference('AudioAlerts') %]
484 var AUDIO_ALERTS = JSON.parse( "[% To.json(AudioAlerts.AudioAlerts) | $raw %]" );
485 $( document ).ready(function() {
486 if ( AUDIO_ALERTS ) {
487 for ( var k in AUDIO_ALERTS ) {
488 var alert = AUDIO_ALERTS[k];
489 if ( $( alert.selector ).length ) {
490 playSound( alert.sound );
496 function playSound( sound ) {
497 if ( ( sound.indexOf('http://') == 0 || sound.indexOf('https://') == 0 ) ) {
498 document.getElementById("audio-alert").innerHTML = '<audio src="' + sound + '" autoplay="autoplay" autobuffer="autobuffer"></audio>';
504 $(document).ready(function() {
506 [% IF ( patronid ) %]sco_init();[% END %]
507 $("#loanTable").dataTable($.extend(true, {}, dataTablesDefaults, {
511 { "targets": [ "nosort" ], "sortable": false, "searchable": false },
512 { "targets": [ "noshow" ], "visible": false, "searchable": false },
513 { "type": "anti-the", "targets" : [ "anti-the" ] }
517 $("#logout_form").on("click", function(e){
519 clearTimeout(mainTimeout);
520 [% IF Koha.Preference('SelfCheckReceiptPrompt') %]
521 var confirmStart = Date.now();
522 confirmModal("", _("Would you like to print a receipt?"), _("Print receipt and end session"), _("End session"), function(result) {
523 if ( result && (Date.now() - confirmStart) < [% SelfCheckTimeout | html %] ) {
524 var win = window.open("/cgi-bin/koha/sco/printslip.pl?print=qslip");
525 location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout';
527 location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout';
531 location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout';
540 [% IF ( Koha.Preference('SCOUserJS') ) %]<script>[% Koha.Preference('SCOUserJS') | $raw %]</script>[% END %]