8 [% INCLUDE 'doc-head-open.inc' %]
9 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha [% END %] › Self checkout </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 <h3>Item cannot be checked out.</h3>
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 <input type="hidden" name="op" value="returnbook" />
101 <input type="hidden" name="patronid" value="[% patronid | html %]" />
102 <input type="hidden" name="barcode" value="[% barcode | html %]" />
103 <input type="hidden" name="newissues" value="[% newissues | html %]" />
104 <button type="submit" name="returnbook" class="btn btn-primary"><i class="fa fa-undo" aria-hidden="true"></i> Return this item</button>
108 <form action="/cgi-bin/koha/sco/sco-main.pl" name="errorForm" class="inline" method="post">
109 <input type="hidden" name="op" value="" />
110 <input type="hidden" name="patronid" value="[% patronid | html %]" />
111 <input type="hidden" name="barcode" value="[% barcode | html %]" />
112 <input type="hidden" name="newissues" value="[% newissues | html %]" />
113 <input type="submit" name= "confirm" value="Return to account summary" class="btn btn-info back focus" />
115 </div> <!-- / .alert -->
116 [% END # / IF ( impossible %]
118 [% IF ( confirm ) %]<!-- We need to confirm the issue.. -->
119 <div class="alert alert-warning"><h3>Please confirm the checkout:</h3>
120 <span class="sco-alert-warning confirm"></span>
121 [% IF ( confirm_renew_issue ) %]
122 <p>This item is already checked out to you.</p>
125 [% IF ( renew && Koha.Preference('SCOAllowCheckin') ) %]
126 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
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 <input type="hidden" name="op" value="renew" />
139 <input type="hidden" name="patronid" value="[% patronid | html %]" />
140 <input type="hidden" name="barcode" value="[% barcode | html %]" />
141 <input type="hidden" name="confirmed" value="1" />
142 <input type="hidden" name="newissues" value="[% newissues | html %]" />
143 <button type="submit" name="confirm" class="btn btn-primary"><i class="fa fa-refresh" aria-hidden="true"></i> Renew item</button>
146 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
147 <input type="hidden" name="op" value="renew" />
148 <input type="hidden" name="patronid" value="[% patronid | html %]" />
149 <input type="hidden" name="barcode" value="[% barcode | html %]" />
150 <input type="hidden" name="confirmed" value="1" />
151 <input type="hidden" name="newissues" value="[% newissues | html %]" />
152 <button type="submit" class="btn btn-primary"><i class="fa fa-refresh" aria-hidden="true"></i> Renew item</button>
156 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
157 <input type="hidden" name="op" value="" />
158 <input type="hidden" name="patronid" value="[% patronid | html %]" />
159 <input type="hidden" name="newissues" value="[% newissues | html %]" />
160 <button type="submit" class="btn btn-primary"><i class="fa fa-cancel" aria-hidden="true"></i> Cancel</button>
163 [% END # / IF confirm %]
165 [% IF ( nopermission ) %]
166 <!-- This is what is displayed if user doesn't have permission -->
167 <div class="alert alert-warning">
168 <span class="sco-alert-warning nopermission"></span>
169 <h3>Access denied</h3>
170 <p>Sorry, this self-checkout station has lost authentication. Please contact the administrator to resolve this problem.</p>
174 [% IF ( different_ip ) %]
175 <!-- This is what is displayed if user doesn't have permission -->
176 <div class="alert alert-warning">
177 <span class="sco-alert-warning sessionlost"></span>
178 <h3>Session lost</h3>
179 <p>You are accessing self-checkout from a different IP address! please log in again.</p>
183 [% IF ( invalid_username_or_password ) %]
184 <!-- This is what is displayed if user doesn't have permission -->
185 <div class="alert alert-warning">
186 <span class="sco-alert-warning notfound"></span>
187 <h3>Record not found</h3>
188 <p>Your userid was not found in the database. Please try again.</p>
193 <span class="sco-alert-success issue"></span>
194 <div class="alert alert-info">
195 <p>Item checked out</p>
197 [% ELSIF ( renewed ) %]
198 <span class="sco-alert-success renew"></span>
199 <div class="alert alert-info">
202 [% ELSIF ( returned == 0 ) %]
203 <span class="sco-alert-warning return"></span>
204 <div class="alert alert-info">
205 <p>Item not checked in: please see circulation staff for assistance</p>
207 [% ELSIF ( returned == 1 ) %]
208 <span class="sco-alert-success return"></span>
209 <div class="alert alert-info">
210 <p>Item checked in</p>
215 [% UNLESS ( hide_main ) %]
217 [% IF ( patronid ) %]
218 [% IF ( validuser ) %]
219 <div class="alert alert-info">You are logged in as [% borrowername | html %].</div>
220 [% INCLUDE 'opac-note.inc' %]
221 [% IF patron_has_hold_fee %]
222 <div class="alert alert-warning">A hold fee was charged to your account for collecting this item.</div>
227 <div class="alert alert-warning">
229 <p>The userid <strong>[% patronid | html %]</strong> was not found in the database. Please try again.</p>
232 [% END # / IF patronid %]
234 [% IF ( validuser ) %]
235 <div id="newcheckout" class="sco_entry">
236 <form id="scan_form" name="scan_form" method="post" action="/cgi-bin/koha/sco/sco-main.pl" onsubmit="return checkout_confirm('[% patronid | html %]');">
238 [% IF ( Koha.Preference('SCOAllowCheckin') ) %]
239 Check out, return, or renew an item:
241 Check out or renew an item:
246 <label for="barcode">Scan a new item or enter its barcode:</label>
249 <input id="barcode" name="barcode" size="20" type="text" class="focus form-control" autocomplete="off" />
251 <div class="col-auto">
252 <button type="submit" class="btn btn-primary">Submit</button>
254 <div class="col ml-auto">
255 <button type="button" id="logout_form" class="btn btn-info"><i class="fa fa-check" aria-hidden="true"></i> Finish</button>
256 <input type="hidden" name="op" value="checkout" />
257 <input type="hidden" name="patronid" value="[% patronid | html %]" />
258 <input type="hidden" name="newissues" value="[% newissues | html %]" />
260 </div> <!-- /.row -->
261 </form> <!-- /#scan_form -->
262 </div> <!-- / #newcheckout -->
263 </div> <!-- / .span12/12 -->
264 [% IF ( display_patron_image ) %]
265 <div class="col-lg-2">
266 <img src="/cgi-bin/koha/sco/sco-patron-image.pl?borrowernumber=[% borrowernumber | uri %]&csrf_token=[% csrf_token | uri %]" alt="" />
269 </div> <!-- / .row -->
270 </div> <!-- / .container-fluid -->
272 <div class="container-fluid">
274 <div class="col order-first order-md-first order-lg-2">
275 <ul class="nav nav-tabs" role="tablist">
276 <li class="nav-item" role="presentation">
277 <a class="nav-link active" href="#checkouts-tab" id="checkouts" aria-controls="home" aria-selected="true" data-toggle="tab">Checkouts ([% issues_count | html %])</a>
279 <li class="nav-item" role="presentation">
280 <a class="nav-link" href="#holds-tab" id="holds" aria-controls="home" aria-selected="false" data-toggle="tab">
281 [% IF waiting_holds_count %]
282 <i class="fa fa-exclamation" aria-hidden="true"></i>
284 Holds ([% HOLDS.count | html %])
287 <li class="nav-item" role="presentation">
288 <a class="nav-link" href="#account-tab" id="account" aria-controls="home" aria-selected="false" data-toggle="tab">Charges ([% total | $Price %])</a>
291 <div class="tab-content">
292 <div id="checkouts-tab" class="tab-pane show active" aria-labelledby="checkouts">
293 <div id="borrowerdetails">
294 [% IF ( issues_count ) %]
295 <table id="loanTable" class="table table-bordered table-striped">
296 <caption>Checkouts for [% borrowername | html %] <span class="count">([% issues_count | html %] total)</span></caption>
297 <!-- ISSUES TABLE ROWS -->
300 <th class="noshow">Checked out on</th>
301 <th class="anti-the">Title</th>
303 <th class="title-string">Due</th>
304 <th class="nosort">Renew</th>
305 [% UNLESS ( nofines ) %]
311 [% FOREACH ISSUE IN ISSUES %]
313 <td>[% ISSUE.issuedate | html %]</td>
315 [% UNLESS ( noitemlinks ) %]
316 <a href="/cgi-bin/koha/opac-detail.pl?bib=[% ISSUE. biblionumber | uri %]">[% ISSUE.title | html %]</a>
318 <strong>[% ISSUE.title | html %]</strong>
320 [% IF ( newissues.match(ISSUE.barcode)) %]
321 <span class="label label-info">NEW</span>
323 <span class="item-details">[% ISSUE.author | html %]</span>
324 ([% ISSUE.barcode | html %])
326 <td>[% ISSUE.itemcallnumber | html %]</td>
327 [% IF ( ISSUE.overdue ) %]
328 <td class="overdue"><span title="[% ISSUE.date_due | html %]">[% ISSUE.date_due | $KohaDates as_due_date => 1 %]</span></td>
330 <td><span title="[% ISSUE.date_due | html %]">[% ISSUE.date_due | $KohaDates as_due_date => 1 %]</span></td>
333 <form action="/cgi-bin/koha/sco/sco-main.pl" method="post">
334 <input type="hidden" name="patronid" value="[% patronid | html %]" />
335 <input type="hidden" name="barcode" value="[% ISSUE.barcode | html %]" />
336 <input type="hidden" name="newissues" value="[% newissues | html %]" />
337 [% IF ISSUE.can_be_renewed %]
338 <input type="hidden" name="op" value="renew" />
339 <input type="hidden" name="confirmed" value="1" />
340 [% UNLESS ( ISSUE.renew ) %]
341 <input type="submit" value="Renew item" name="confirm " class="btn btn-primary btn-sm renew" />
343 <input type="submit" value="Renew item" class="btn btn-primary btn-sm renew" />
346 [% IF ISSUE.renew_error == 'auto_renew' OR ISSUE.renew_error == 'auto_too_soon' %]
347 <span>This item has been scheduled for automatic renewal and cannot be renewed</span>
348 [% ELSIF ISSUE.renew_error == 'onsite_checkout' %]
349 <span>This is a on-site checkout, it cannot be renewed.</span>
350 [% ELSIF ISSUE.renew_error == 'too_unseen' %]
351 <span>You have renewed this item the maximum number of consecutive times without it being seen by the library.</span>
353 <span>No renewals allowed</span>
355 [% IF Koha.Preference('SCOAllowCheckin') %]
356 <input type="submit" value="Check in item" name="confirm" class="btn btn-info btn-sm return" />
357 <input type="hidden" name="op" value="returnbook" />
358 <input type="hidden" name="confirmed" value="" />
363 [% UNLESS ( nofines ) %]
365 [% IF ( ISSUE.charges ) %]Yes[% ELSE %]No[% END %]
369 [% END # / FOREACH ISSUE %]
373 <h3>You currently have nothing checked out.</h3>
374 [% END # / IF issues_count %]
375 </div> <!-- / #borrowerdetails -->
377 <div id="holds-tab" class="tab-pane" role="tabpanel" aria-labelledby="holds">
378 [% IF HOLDS.count > 0 %]
379 [% PROCESS 'holds-table.inc' HOLDS = HOLDS, SuspendHoldsOpac = SuspendHoldsOpac, showpriority = showpriority, AutoResumeSuspendedHolds = AutoResumeSuspendedHolds, onlyinfo = 'true' %]
381 <h3>You currently have no pending holds.</h3>
384 <div id="account-tab" class="tab-pane" role="tabpanel" aria-labelledby="account">
385 [% PROCESS 'account-table.inc' %]
388 [% ELSE # IF validuser %]
389 <div class="sco_entry" >
390 <form id="mainform" action="/cgi-bin/koha/sco/sco-main.pl" name="mainform" method="post">
392 [% IF ( Koha.Preference('SelfCheckoutByLogin') ) %]
393 <legend>Log in to your account</legend>
394 <label for="patronlogin">Login:</label>
395 <input type="text" id="patronlogin" class="focus noEnterSubmit" size="20" name="patronlogin" />
396 <label for="patronpw">Password:</label>
397 <input type="password" id="patronpw" size="20" name="patronpw" />
398 <fieldset class="action">
399 <button type="submit" class="btn btn-primary">Log in</button>
402 <div class="form-row">
403 <div class="col-auto">
404 <label for="patronid">Please enter your card number:</label>
407 <input type="text" id="patronid" class="form-control focus" size="20" name="patronid" autocomplete="off" />
409 <div class="col-auto">
410 <button type="submit" class="btn btn-primary">Submit</button>
412 </div> <!-- /.form-row -->
415 [% FOREACH INPUT IN INPUTS %]
416 <input type="hidden" name="[% INPUT.name | html %]" value="[% INPUT.value | html %]">
418 <input type="hidden" name="op" value="login" />
421 </div> <!-- / .sco_entry -->
422 [% END # / IF validuser %]
423 [% END # / UNLESS ( hide_main %]
424 [% IF ( Koha.Preference('SCOMainUserBlock' ) ) %]<div id="scomainuserblock">[% Koha.Preference('SCOMainUserBlock' ) | $raw %]</div>[% END %]
425 </div> <!-- / .span12 -->
426 </div> <!-- / .row -->
427 </div> <!-- / .container-fluid -->
428 </div> <!-- / .main -->
429 <span id="audio-alert"></span>
431 [% INCLUDE 'opac-bottom.inc' %]
432 [% BLOCK jsinclude %]
433 [% INCLUDE 'datatables.inc' %]
435 function mungeHistory() {
436 // prevent back button from allowing form resubmission
437 if (history && history.pushState) {
438 history.replaceState(null, document.title, window.location.href);
442 function sco_init() {
443 mainTimeout = setTimeout(function() {
444 location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout';
445 }, [% SelfCheckTimeout | html %]);
447 function dofocus() { // named function req'd for body onload event by some FF and IE7 security models
448 // alert("dofocus called");
449 $(".focus:last").select();
451 var slip_re = /slip/;
452 function printx_window(print_type) {
453 var handler = print_type.match(slip_re) ? "printslip" : "moremember";
457 function checkout_confirm(patronid) {
458 var barcode = $("#barcode").val();
459 // alert("checkout_confirm('" + patronid + "') called for barcode '" + barcode + "'");
460 if (! barcode) { dofocus(); return false; } // no barcode
461 if (barcode == "__KOHA_NEW_CIRC__") { // magic barcode
462 window.location.href='/cgi-bin/koha/sco/sco-main.pl?op=logout';
467 [% IF Koha.Preference('AudioAlerts') %]
468 var AUDIO_ALERTS = JSON.parse( "[% To.json(AudioAlerts.AudioAlerts) | $raw %]" );
469 $( document ).ready(function() {
470 if ( AUDIO_ALERTS ) {
471 for ( var k in AUDIO_ALERTS ) {
472 var alert = AUDIO_ALERTS[k];
473 if ( $( alert.selector ).length ) {
474 playSound( alert.sound );
480 function playSound( sound ) {
481 if ( ( sound.indexOf('http://') == 0 || sound.indexOf('https://') == 0 ) ) {
482 document.getElementById("audio-alert").innerHTML = '<audio src="' + sound + '" autoplay="autoplay" autobuffer="autobuffer"></audio>';
488 $(document).ready(function() {
490 [% IF ( patronid ) %]sco_init();[% END %]
491 $("#loanTable").dataTable($.extend(true, {}, dataTablesDefaults, {
494 { "targets": [ "nosort" ], "sortable": false, "searchable": false },
495 { "targets": [ "noshow" ], "visible": false, "searchable": false },
496 { "type": "anti-the", "targets" : [ "anti-the" ] },
497 { "type": "title-string", "targets" : [ "title-string" ] }
501 $("#logout_form").on("click", function(e){
503 clearTimeout(mainTimeout);
504 [% IF Koha.Preference('SelfCheckReceiptPrompt') %]
505 var confirmStart = Date.now();
506 confirmModal("", _("Would you like to print a receipt?"), _("Print receipt and end session"), _("End session"), function(result) {
507 if ( result && (Date.now() - confirmStart) < [% SelfCheckTimeout | html %] ) {
508 var win = window.open("/cgi-bin/koha/sco/printslip.pl?borrowernumber=[% borrowernumber | html %]&print=qslip");
509 location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout';
511 location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout';
515 location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout';
524 [% IF ( Koha.Preference('SCOUserJS') ) %]<script>[% Koha.Preference('SCOUserJS') | $raw %]</script>[% END %]