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 <span id="ce_unknown_barcode">The system does not recognize this barcode.</span>
64 [% ELSIF ( circ_error_max_loans_allowed ) %]
65 <span id="ce_max_loans_allowed">You have checked out too many items and can't check out any more.</span>
66 [% ELSIF ( circ_error_ISSUED_TO_ANOTHER ) %]
67 <span id="ce_issued_to_another">This item is checked out to someone else.</span>
68 [% ELSIF ( circ_error_NO_MORE_RENEWALS ) %]
69 <span id="ce_no_more_renewals">You cannot renew this item again.</span>
70 [% ELSIF ( circ_error_NOT_FOR_LOAN ) %]
71 <span id="ce_not_for_loan">This item is not for loan.</span>
72 [% ELSIF ( circ_error_DEBT ) %]
73 <span id="ce_too_much_debt">You owe the library [% DEBT | $Price %] and cannot check out.</span>
74 [% ELSIF ( circ_error_WTHDRAWN ) %]
75 <span id="ce_wthdrawn">This item has been withdrawn from the collection.</span>
76 [% ELSIF ( circ_error_RESTRICTED ) %]
77 <span id="ce_restricted">This item is restricted.</span>
78 [% ELSIF ( circ_error_RESERVED ) %]
79 <span id="ce_reserved">This item is on hold for another patron.</span>
80 [% ELSIF ( circ_error_ITEMNOTSAMEBRANCH ) %]
81 <span id="ce_itemnotsamebranch">This item belongs to another library.</span>
82 [% ELSIF ( circ_error_EXPIRED ) %]
83 <span id="ce_expired">Your account has expired.</span>
84 [% ELSIF ( circ_error_DEBARRED ) %]
85 <span id="ce_debarred">Your account has been suspended.</span>
86 [% ELSIF ( circ_error_CARD_LOST ) %]
87 <span id="ce_card_lost">This library card has been declared lost.</span>
88 [% ELSIF ( circ_error_GNA ) %]
89 <span id="ce_gna">Your contact information seems to be incomplete.</span>
90 [% ELSIF ( circ_error_INVALID_DATE ) %]
91 <span id="ce_invalid_date">Due date is not valid.</span>
92 [% ELSIF ( circ_error_ADDITIONAL_MATERIALS ) %]
93 <span id="ce_addtional_materials">Item must be checked out at a circulation desk.</span>
95 <span id ="ce_see_staff">Please see a member of the library staff.</span>
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 ( returned == 0 ) %]
209 <span class="sco-alert-warning return"></span>
210 <div class="alert alert-info">
211 <p>Item not checked in: please see circulation staff for assistance</p>
213 [% ELSIF ( returned == 1 ) %]
214 <span class="sco-alert-success return"></span>
215 <div class="alert alert-info">
216 <p>Item checked in</p>
221 [% UNLESS ( hide_main ) %]
223 [% IF ( patronid ) %]
224 [% IF ( validuser ) %]
225 <div class="alert alert-info">You are logged in as [% borrowername | html %].</div>
226 [% INCLUDE 'opac-note.inc' %]
227 [% IF patron_has_hold_fee %]
228 <div class="alert alert-warning">A hold fee was charged to your account for collecting this item.</div>
233 <div class="alert alert-warning">
235 <p>The userid <strong>[% patronid | html %]</strong> was not found in the database. Please try again.</p>
238 [% END # / IF patronid %]
240 [% IF ( validuser ) %]
241 <div id="newcheckout" class="sco_entry">
242 <form id="scan_form" name="scan_form" method="post" action="/cgi-bin/koha/sco/sco-main.pl" onsubmit="return checkout_confirm('[% patronid | html %]');">
244 [% IF ( Koha.Preference('SCOAllowCheckin') ) %]
245 Check out, return, or renew an item:
247 Check out or renew an item:
252 <label for="barcode">Scan a new item or enter its barcode:</label>
255 <input id="barcode" name="barcode" size="20" type="text" class="focus form-control" autocomplete="off" />
257 <div class="col-auto">
258 <button type="submit" class="btn btn-primary">Submit</button>
260 <div class="col ml-auto">
261 <button type="button" id="logout_form" class="btn btn-info"><i class="fa fa-check" aria-hidden="true"></i> Finish</button>
262 <input type="hidden" name="op" value="checkout" />
263 <input type="hidden" name="patronid" value="[% patronid | html %]" />
264 <input type="hidden" name="newissues" value="[% newissues | html %]" />
266 </div> <!-- /.row -->
267 </form> <!-- /#scan_form -->
268 </div> <!-- / #newcheckout -->
269 </div> <!-- / .span12/12 -->
270 [% IF ( display_patron_image ) %]
271 <div class="col-lg-2">
272 <img src="/cgi-bin/koha/sco/sco-patron-image.pl?borrowernumber=[% borrowernumber | uri %]&csrf_token=[% csrf_token | uri %]" alt="" />
275 </div> <!-- / .row -->
276 </div> <!-- / .container-fluid -->
278 <div class="container-fluid">
280 <div class="col order-first order-md-first order-lg-2">
281 <ul class="nav nav-tabs" role="tablist">
282 <li class="nav-item" role="presentation">
283 <a class="nav-link active" href="#checkouts-tab" id="checkouts" aria-controls="home" aria-selected="true" data-toggle="tab">Checkouts ([% issues_count | html %])</a>
285 <li class="nav-item" role="presentation">
286 <a class="nav-link" href="#holds-tab" id="holds" aria-controls="home" aria-selected="false" data-toggle="tab">
287 [% IF waiting_holds_count %]
288 <i class="fa fa-exclamation" aria-hidden="true"></i>
290 Holds ([% HOLDS.count | html %])
293 <li class="nav-item" role="presentation">
294 <a class="nav-link" href="#account-tab" id="account" aria-controls="home" aria-selected="false" data-toggle="tab">Charges ([% total | $Price %])</a>
297 <div class="tab-content">
298 <div id="checkouts-tab" class="tab-pane show active" aria-labelledby="checkouts">
299 <div id="borrowerdetails">
300 [% IF ( issues_count ) %]
301 <table id="loanTable" class="table table-bordered table-striped">
302 <caption>Checkouts for [% borrowername | html %] <span class="count">([% issues_count | html %] total)</span></caption>
303 <!-- ISSUES TABLE ROWS -->
306 <th class="noshow">Checked out on</th>
307 <th class="anti-the">Title</th>
310 <th class="nosort">Renew</th>
311 [% UNLESS ( nofines ) %]
317 [% FOREACH ISSUE IN ISSUES %]
319 <td>[% ISSUE.issuedate | html %]</td>
321 [% UNLESS ( noitemlinks ) %]
322 <a href="/cgi-bin/koha/opac-detail.pl?bib=[% ISSUE. biblionumber | uri %]">[% ISSUE.title | html %]</a>
324 <strong>[% ISSUE.title | html %]</strong>
326 [% IF ( newissues.match(ISSUE.barcode)) %]
327 <span class="label label-info">NEW</span>
329 <span class="item-details">[% ISSUE.author | html %]</span>
330 ([% ISSUE.barcode | html %])
332 <td>[% ISSUE.itemcallnumber | html %]</td>
333 [% IF ( ISSUE.overdue ) %]
334 <td class="overdue" data-order="[% ISSUE.date_due | html %]">
335 [% ISSUE.date_due | $KohaDates as_due_date => 1 %]
338 <td data-order="[% ISSUE.date_due | html %]">
339 [% ISSUE.date_due | $KohaDates as_due_date => 1 %]
343 <form action="/cgi-bin/koha/sco/sco-main.pl" method="post">
344 <legend class="sr-only">Issue renews</legend>
345 <input type="hidden" name="patronid" value="[% patronid | html %]" />
346 <input type="hidden" name="barcode" value="[% ISSUE.barcode | html %]" />
347 <input type="hidden" name="newissues" value="[% newissues | html %]" />
348 [% IF ISSUE.can_be_renewed %]
349 <input type="hidden" name="op" value="renew" />
350 <input type="hidden" name="confirmed" value="1" />
351 [% UNLESS ( ISSUE.renew ) %]
352 <input type="submit" value="Renew item" name="confirm " class="btn btn-primary btn-sm renew" />
354 <input type="submit" value="Renew item" class="btn btn-primary btn-sm renew" />
357 [% IF ISSUE.renew_error == 'auto_renew' OR ISSUE.renew_error == 'auto_too_soon' %]
358 <span>This item has been scheduled for automatic renewal and cannot be renewed</span>
359 [% ELSIF ISSUE.renew_error == 'onsite_checkout' %]
360 <span>This is a on-site checkout, it cannot be renewed.</span>
361 [% ELSIF ISSUE.renew_error == 'too_unseen' %]
362 <span>You have renewed this item the maximum number of consecutive times without it being seen by the library.</span>
364 <span>No renewals allowed</span>
366 [% IF Koha.Preference('SCOAllowCheckin') %]
367 <input type="submit" value="Check in item" name="confirm" class="btn btn-info btn-sm return" />
368 <input type="hidden" name="op" value="returnbook" />
369 <input type="hidden" name="confirmed" value="" />
374 [% UNLESS ( nofines ) %]
376 [% IF ( ISSUE.charges ) %]Yes[% ELSE %]No[% END %]
380 [% END # / FOREACH ISSUE %]
384 <h3>You currently have nothing checked out.</h3>
385 [% END # / IF issues_count %]
386 </div> <!-- / #borrowerdetails -->
388 <div id="holds-tab" class="tab-pane" role="tabpanel" aria-labelledby="holds">
389 [% IF HOLDS.count > 0 %]
390 [% PROCESS 'holds-table.inc' HOLDS = HOLDS, SuspendHoldsOpac = SuspendHoldsOpac, showpriority = showpriority, AutoResumeSuspendedHolds = AutoResumeSuspendedHolds, onlyinfo = 'true' %]
392 <h3>You currently have no pending holds.</h3>
395 <div id="account-tab" class="tab-pane" role="tabpanel" aria-labelledby="account">
396 [% PROCESS 'account-table.inc' %]
399 [% ELSE # IF validuser %]
400 <div class="sco_entry" >
401 <form id="mainform" action="/cgi-bin/koha/sco/sco-main.pl" name="mainform" method="post">
403 [% IF ( Koha.Preference('SelfCheckoutByLogin') ) %]
404 <legend>Log in to your account</legend>
405 <label for="patronlogin">Login:</label>
406 <input type="text" id="patronlogin" class="focus noEnterSubmit" size="20" name="patronlogin" />
407 <label for="patronpw">Password:</label>
408 <input type="password" id="patronpw" size="20" name="patronpw" />
409 <fieldset class="action">
410 <button type="submit" class="btn btn-primary">Log in</button>
413 <div class="form-row">
414 <div class="col-auto">
415 <label for="patronid">Please enter your card number:</label>
418 <input type="text" id="patronid" class="form-control focus" size="20" name="patronid" autocomplete="off" />
420 <div class="col-auto">
421 <button type="submit" class="btn btn-primary">Submit</button>
423 </div> <!-- /.form-row -->
426 [% FOREACH INPUT IN INPUTS %]
427 <input type="hidden" name="[% INPUT.name | html %]" value="[% INPUT.value | html %]">
429 <input type="hidden" name="op" value="login" />
432 </div> <!-- / .sco_entry -->
433 [% END # / IF validuser %]
434 [% END # / UNLESS ( hide_main %]
435 [% IF ( Koha.Preference('SCOMainUserBlock' ) ) %]<div id="scomainuserblock">[% Koha.Preference('SCOMainUserBlock' ) | $raw %]</div>[% END %]
436 </div> <!-- / .span12 -->
437 </div> <!-- / .row -->
438 </div> <!-- / .container-fluid -->
439 </div> <!-- / .main -->
440 <span id="audio-alert"></span>
442 [% INCLUDE 'opac-bottom.inc' %]
443 [% BLOCK jsinclude %]
444 [% INCLUDE 'datatables.inc' %]
446 function mungeHistory() {
447 // prevent back button from allowing form resubmission
448 if (history && history.pushState) {
449 history.replaceState(null, document.title, window.location.href);
453 function sco_init() {
454 mainTimeout = setTimeout(function() {
455 location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout';
456 }, [% SelfCheckTimeout | html %]);
458 function dofocus() { // named function req'd for body onload event by some FF and IE7 security models
459 // alert("dofocus called");
460 $(".focus:last").select();
462 var slip_re = /slip/;
463 function printx_window(print_type) {
464 var handler = print_type.match(slip_re) ? "printslip" : "moremember";
468 function checkout_confirm(patronid) {
469 var barcode = $("#barcode").val();
470 // alert("checkout_confirm('" + patronid + "') called for barcode '" + barcode + "'");
471 if (! barcode) { dofocus(); return false; } // no barcode
472 if (barcode == "__KOHA_NEW_CIRC__") { // magic barcode
473 window.location.href='/cgi-bin/koha/sco/sco-main.pl?op=logout';
478 [% IF Koha.Preference('AudioAlerts') %]
479 var AUDIO_ALERTS = JSON.parse( "[% To.json(AudioAlerts.AudioAlerts) | $raw %]" );
480 $( document ).ready(function() {
481 if ( AUDIO_ALERTS ) {
482 for ( var k in AUDIO_ALERTS ) {
483 var alert = AUDIO_ALERTS[k];
484 if ( $( alert.selector ).length ) {
485 playSound( alert.sound );
491 function playSound( sound ) {
492 if ( ( sound.indexOf('http://') == 0 || sound.indexOf('https://') == 0 ) ) {
493 document.getElementById("audio-alert").innerHTML = '<audio src="' + sound + '" autoplay="autoplay" autobuffer="autobuffer"></audio>';
499 $(document).ready(function() {
501 [% IF ( patronid ) %]sco_init();[% END %]
502 $("#loanTable").dataTable($.extend(true, {}, dataTablesDefaults, {
506 { "targets": [ "nosort" ], "sortable": false, "searchable": false },
507 { "targets": [ "noshow" ], "visible": false, "searchable": false },
508 { "type": "anti-the", "targets" : [ "anti-the" ] }
512 $("#logout_form").on("click", function(e){
514 clearTimeout(mainTimeout);
515 [% IF Koha.Preference('SelfCheckReceiptPrompt') %]
516 var confirmStart = Date.now();
517 confirmModal("", _("Would you like to print a receipt?"), _("Print receipt and end session"), _("End session"), function(result) {
518 if ( result && (Date.now() - confirmStart) < [% SelfCheckTimeout | html %] ) {
519 var win = window.open("/cgi-bin/koha/sco/printslip.pl?borrowernumber=[% borrowernumber | html %]&print=qslip");
520 location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout';
522 location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout';
526 location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout';
535 [% IF ( Koha.Preference('SCOUserJS') ) %]<script>[% Koha.Preference('SCOUserJS') | $raw %]</script>[% END %]