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 %]
28 function _(s) { return s } // dummy function for gettext
30 [% Asset.js("lib/modernizr.min.js") | $raw %]
32 <body id="sco_main" class="sco" onload="dofocus();" onunload="mungeHistory();">
33 [% INCLUDE 'masthead-sco.inc' %]
36 <div class="container-fluid">
38 [% IF ( display_patron_image ) %]
39 <div class="col-10 order-first order-md-first order-lg-2">
41 <div class="col order-first order-md-first order-lg-2">
44 <div id="masthead"><h1>[% LibraryName | html %] Self checkout system</h1></div>
46 [% IF ( impossible ) %]<!-- We tried to issue, but failed. -->
47 <div class="alert alert-warning">
48 <span class="sco-alert-warning noissue"></span>
49 <h3>Item cannot be checked out.</h3>
50 <p>Sorry, this item cannot be checked out at this station.</p>
52 <p>Title: <em>[% title | html %]</em> </p>
56 [% IF ( circ_error_UNKNOWN_BARCODE ) %]
57 The system does not recognize this barcode.
58 [% ELSIF ( circ_error_max_loans_allowed ) %]
59 You have checked out too many items and can't check out any more.
60 [% ELSIF ( circ_error_ISSUED_TO_ANOTHER ) %]
61 This item is checked out to someone else.
62 [% ELSIF ( circ_error_NO_MORE_RENEWALS ) %]
63 You cannot renew this item again.
64 [% ELSIF ( circ_error_NOT_FOR_LOAN ) %]
65 This item is not for loan.
66 [% ELSIF ( circ_error_DEBT ) %]
67 You owe the library [% DEBT | $Price %] and cannot check out.
68 [% ELSIF ( circ_error_WTHDRAWN ) %]
69 This item has been withdrawn from the collection.
70 [% ELSIF ( circ_error_RESTRICTED ) %]
71 This item is restricted.
72 [% ELSIF ( circ_error_RESERVED ) %]
73 This item is on hold for another patron.
74 [% ELSIF ( circ_error_ITEMNOTSAMEBRANCH ) %]
75 This item belongs to another branch.
76 [% ELSIF ( circ_error_EXPIRED ) %]
77 Your account has expired.
78 [% ELSIF ( circ_error_DEBARRED ) %]
79 Your account has been suspended.
80 [% ELSIF ( circ_error_CARD_LOST ) %]
81 This card has been declared lost.
82 [% ELSIF ( circ_error_GNA ) %]
83 Your contact information seems to be incomplete.
84 [% ELSIF ( circ_error_INVALID_DATE ) %]
85 Due date is not valid.
87 Please see a member of the library staff.
90 [% IF ( returnitem && Koha.Preference('SCOAllowCheckin') ) %]
91 <form action="/cgi-bin/koha/sco/sco-main.pl" name="errorForm" class="inline" method="post">
92 <input type="hidden" name="op" value="returnbook" />
93 <input type="hidden" name="patronid" value="[% patronid | html %]" />
94 <input type="hidden" name="barcode" value="[% barcode | html %]" />
95 <input type="hidden" name="newissues" value="[% newissues | html %]" />
96 <button type="submit" name="returnbook" class="btn btn-primary"><i class="fa fa-undo" aria-hidden="true"></i> Return this item</button>
100 <form action="/cgi-bin/koha/sco/sco-main.pl" name="errorForm" class="inline" method="post">
101 <input type="hidden" name="op" value="" />
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 <input type="submit" name= "confirm" value="Return to account summary" class="btn btn-info back focus" />
107 </div> <!-- / .alert -->
108 [% END # / IF ( impossible %]
110 [% IF ( confirm ) %]<!-- We need to confirm the issue.. -->
111 <div class="alert alert-warning"><h3>Please confirm the checkout:</h3>
112 <span class="sco-alert-warning confirm"></span>
113 [% IF ( confirm_renew_issue ) %]
114 <p>This item is already checked out to you.</p>
117 [% IF ( renew && Koha.Preference('SCOAllowCheckin') ) %]
118 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
119 <input type="hidden" name="op" value="returnbook" />
120 <input type="hidden" name="patronid" value="[% patronid | html %]" />
121 <input type="hidden" name="barcode" value="[% barcode | html %]" />
122 <input type="hidden" name="confirmed" value="" />
123 <input type="hidden" name="newissues" value="[% newissues | html %]" />
124 <button type="submit" name="returnbook" class="btn btn-primary"><i class="fa fa-undo" aria-hidden="true"></i> Return this item</button>
128 [% UNLESS ( renew ) %]
129 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
130 <input type="hidden" name="op" value="renew" />
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="1" />
134 <input type="hidden" name="newissues" value="[% newissues | html %]" />
135 <button type="submit" name="confirm" class="btn btn-primary"><i class="fa fa-refresh" aria-hidden="true"></i> Renew item</button>
138 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
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" class="btn btn-primary"><i class="fa fa-refresh" aria-hidden="true"></i> Renew item</button>
148 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
149 <input type="hidden" name="op" value="" />
150 <input type="hidden" name="patronid" value="[% patronid | html %]" />
151 <input type="hidden" name="newissues" value="[% newissues | html %]" />
152 <button type="submit" class="btn btn-primary"><i class="fa fa-cancel" aria-hidden="true"></i> Cancel</button>
155 [% END # / IF confirm %]
157 [% IF ( nopermission ) %]
158 <!-- This is what is displayed if user doesn't have permission -->
159 <div class="alert alert-warning">
160 <span class="sco-alert-warning nopermission"></span>
161 <h3>Access denied</h3>
162 <p>Sorry, this self-checkout station has lost authentication. Please contact the administrator to resolve this problem.</p>
166 [% IF ( different_ip ) %]
167 <!-- This is what is displayed if user doesn't have permission -->
168 <div class="alert alert-warning">
169 <span class="sco-alert-warning sessionlost"></span>
170 <h3>Session lost</h3>
171 <p>You are accessing self-checkout from a different IP address! please log in again.</p>
175 [% IF ( invalid_username_or_password ) %]
176 <!-- This is what is displayed if user doesn't have permission -->
177 <div class="alert alert-warning">
178 <span class="sco-alert-warning notfound"></span>
179 <h3>Record not found</h3>
180 <p>Your userid was not found in the database. Please try again.</p>
185 <span class="sco-alert-success issue"></span>
186 <div class="alert alert-info">
187 <p>Item checked out</p>
189 [% ELSIF ( renewed ) %]
190 <span class="sco-alert-success renew"></span>
191 <div class="alert alert-info">
194 [% ELSIF ( returned == 0 ) %]
195 <span class="sco-alert-warning return"></span>
196 <div class="alert alert-info">
197 <p>Item not checked in: please see circulation staff for assistance</p>
199 [% ELSIF ( returned == 1 ) %]
200 <span class="sco-alert-success return"></span>
201 <div class="alert alert-info">
202 <p>Item checked in</p>
207 [% UNLESS ( hide_main ) %]
209 [% IF ( patronid ) %]
210 [% IF ( validuser ) %]
211 <div class="alert alert-info">You are logged in as [% borrowername | html %].</div>
212 [% INCLUDE 'opac-note.inc' %]
213 [% IF patron_has_hold_fee %]
214 <div class="alert alert-warning">A hold fee was charged to your account for collecting this item.</div>
219 <div class="alert alert-warning">
221 <p>The userid <strong>[% patronid | html %]</strong> was not found in the database. Please try again.</p>
224 [% END # / IF patronid %]
226 [% IF ( validuser ) %]
227 <div id="newcheckout" class="sco_entry">
228 <form id="scan_form" name="scan_form" method="post" action="/cgi-bin/koha/sco/sco-main.pl" onsubmit="return checkout_confirm('[% patronid | html %]');">
230 [% IF ( Koha.Preference('SCOAllowCheckin') ) %]
231 Check out, return, or renew an item:
233 Check out or renew an item:
238 <label for="barcode">Scan a new item or enter its barcode:</label>
241 <input id="barcode" name="barcode" size="20" type="text" class="focus form-control" autocomplete="off" />
243 <div class="col-auto">
244 <button type="submit" class="btn btn-primary">Submit</button>
246 <div class="col ml-auto">
247 <button type="button" id="logout_form" class="btn btn-info"><i class="fa fa-check" aria-hidden="true"></i> Finish</button>
248 <input type="hidden" name="op" value="checkout" />
249 <input type="hidden" name="patronid" value="[% patronid | html %]" />
250 <input type="hidden" name="newissues" value="[% newissues | html %]" />
252 </div> <!-- /.row -->
253 </form> <!-- /#scan_form -->
254 </div> <!-- / #newcheckout -->
255 </div> <!-- / .span12/12 -->
256 [% IF ( display_patron_image ) %]
257 <div class="col-lg-2">
258 <img src="/cgi-bin/koha/sco/sco-patron-image.pl?borrowernumber=[% borrowernumber | uri %]&csrf_token=[% csrf_token | uri %]" alt="" />
261 </div> <!-- / .row -->
262 </div> <!-- / .container-fluid -->
264 <div class="container-fluid">
266 <div class="col order-first order-md-first order-lg-2">
267 <ul class="nav nav-tabs" role="tablist">
268 <li class="nav-item" role="presentation">
269 <a class="nav-link active" href="#checkouts-tab" id="checkouts" aria-controls="home" aria-selected="true" data-toggle="tab">Checkouts ([% issues_count | html %])</a>
271 <li class="nav-item" role="presentation">
272 <a class="nav-link" href="#holds-tab" id="holds" aria-controls="home" aria-selected="false" data-toggle="tab">
273 [% IF waiting_holds_count %]
274 <i class="fa fa-exclamation" aria-hidden="true"></i>
276 Holds ([% HOLDS.count | html %])
279 <li class="nav-item" role="presentation">
280 <a class="nav-link" href="#account-tab" id="account" aria-controls="home" aria-selected="false" data-toggle="tab">Charges ([% total | $Price %])</a>
283 <div class="tab-content">
284 <div id="checkouts-tab" class="tab-pane show active" aria-labelledby="checkouts">
285 <div id="borrowerdetails">
286 [% IF ( issues_count ) %]
287 <table id="loanTable" class="table table-bordered table-striped">
288 <caption>Checkouts for [% borrowername | html %] <span class="count">([% issues_count | html %] total)</span></caption>
289 <!-- ISSUES TABLE ROWS -->
292 <th class="noshow">Checked out on</th>
293 <th class="anti-the">Title</th>
295 <th class="title-string">Due</th>
296 <th class="nosort">Renew</th>
297 [% UNLESS ( nofines ) %]
303 [% FOREACH ISSUE IN ISSUES %]
305 <td>[% ISSUE.issuedate | html %]</td>
307 [% UNLESS ( noitemlinks ) %]
308 <a href="/cgi-bin/koha/opac-detail.pl?bib=[% ISSUE. biblionumber | uri %]">[% ISSUE.title | html %]</a>
310 <strong>[% ISSUE.title | html %]</strong>
312 [% IF ( newissues.match(ISSUE.barcode)) %]
313 <span class="label label-info">NEW</span>
315 <span class="item-details">[% ISSUE.author | html %]</span>
316 ([% ISSUE.barcode | html %])
318 <td>[% ISSUE.itemcallnumber | html %]</td>
319 [% IF ( ISSUE.overdue ) %]
320 <td class="overdue"><span title="[% ISSUE.date_due | html %]">[% ISSUE.date_due | $KohaDates as_due_date => 1 %]</span></td>
322 <td><span title="[% ISSUE.date_due | html %]">[% ISSUE.date_due | $KohaDates as_due_date => 1 %]</span></td>
325 <form action="/cgi-bin/koha/sco/sco-main.pl" method="post">
326 <input type="hidden" name="patronid" value="[% patronid | html %]" />
327 <input type="hidden" name="barcode" value="[% ISSUE.barcode | html %]" />
328 <input type="hidden" name="newissues" value="[% newissues | html %]" />
329 [% IF ISSUE.can_be_renewed %]
330 <input type="hidden" name="op" value="renew" />
331 <input type="hidden" name="confirmed" value="1" />
332 [% UNLESS ( ISSUE.renew ) %]
333 <input type="submit" value="Renew item" name="confirm " class="btn btn-primary btn-sm renew" />
335 <input type="submit" value="Renew item" class="btn btn-primary btn-sm renew" />
338 [% IF ISSUE.renew_error == 'auto_renew' OR ISSUE.renew_error == 'auto_too_soon' %]
339 <span>This item has been scheduled for automatic renewal and cannot be renewed</span>
340 [% ELSIF ISSUE.renew_error == 'onsite_checkout' %]
341 <span>This is a on-site checkout, it cannot be renewed.</span>
343 <span>No renewals allowed</span>
345 [% IF Koha.Preference('SCOAllowCheckin') %]
346 <input type="submit" value="Check in item" name="confirm" class="btn btn-info btn-sm return" />
347 <input type="hidden" name="op" value="returnbook" />
348 <input type="hidden" name="confirmed" value="" />
353 [% UNLESS ( nofines ) %]
355 [% IF ( ISSUE.charges ) %]Yes[% ELSE %]No[% END %]
359 [% END # / FOREACH ISSUE %]
363 <h3>You currently have nothing checked out.</h3>
364 [% END # / IF issues_count %]
365 </div> <!-- / #borrowerdetails -->
367 <div id="holds-tab" class="tab-pane" role="tabpanel" aria-labelledby="holds">
368 [% IF HOLDS.count > 0 %]
369 [% PROCESS 'holds-table.inc' HOLDS = HOLDS, SuspendHoldsOpac = SuspendHoldsOpac, showpriority = showpriority, AutoResumeSuspendedHolds = AutoResumeSuspendedHolds, onlyinfo = 'true' %]
371 <h3>You currently have no pending holds.</h3>
374 <div id="account-tab" class="tab-pane" role="tabpanel" aria-labelledby="account">
375 [% PROCESS 'account-table.inc' %]
378 [% ELSE # IF validuser %]
379 <div class="sco_entry" >
380 <form id="mainform" action="/cgi-bin/koha/sco/sco-main.pl" name="mainform" method="post">
382 [% IF ( Koha.Preference('SelfCheckoutByLogin') ) %]
383 <legend>Log in to your account</legend>
384 <label for="patronlogin">Login:</label>
385 <input type="text" id="patronlogin" class="focus noEnterSubmit" size="20" name="patronlogin" />
386 <label for="patronpw">Password:</label>
387 <input type="password" id="patronpw" size="20" name="patronpw" />
388 <fieldset class="action">
389 <button type="submit" class="btn btn-primary">Log in</button>
392 <div class="form-row">
393 <div class="col-auto">
394 <label for="patronid">Please enter your card number:</label>
397 <input type="text" id="patronid" class="form-control focus" size="20" name="patronid" autocomplete="off" />
399 <div class="col-auto">
400 <button type="submit" class="btn btn-primary">Submit</button>
402 </div> <!-- /.form-row -->
405 [% FOREACH INPUT IN INPUTS %]
406 <input type="hidden" name="[% INPUT.name | html %]" value="[% INPUT.value | html %]">
408 <input type="hidden" name="op" value="login" />
411 </div> <!-- / .sco_entry -->
412 [% END # / IF validuser %]
413 [% END # / UNLESS ( hide_main %]
414 [% IF ( Koha.Preference('SCOMainUserBlock' ) ) %]<div id="scomainuserblock">[% Koha.Preference('SCOMainUserBlock' ) | $raw %]</div>[% END %]
415 </div> <!-- / .span12 -->
416 </div> <!-- / .row -->
417 </div> <!-- / .container-fluid -->
418 </div> <!-- / .main -->
419 <span id="audio-alert"></span>
421 [% INCLUDE 'opac-bottom.inc' %]
422 [% BLOCK jsinclude %]
423 [% INCLUDE 'datatables.inc' %]
425 function mungeHistory() {
426 // prevent back button from allowing form resubmission
427 if (history && history.pushState) {
428 history.replaceState(null, document.title, window.location.href);
432 function sco_init() {
433 mainTimeout = setTimeout(function() {
434 location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout';
435 }, [% SelfCheckTimeout | html %]);
437 function dofocus() { // named function req'd for body onload event by some FF and IE7 security models
438 // alert("dofocus called");
439 $(".focus:last").select();
441 var slip_re = /slip/;
442 function printx_window(print_type) {
443 var handler = print_type.match(slip_re) ? "printslip" : "moremember";
447 function checkout_confirm(patronid) {
448 var barcode = $("#barcode").val();
449 // alert("checkout_confirm('" + patronid + "') called for barcode '" + barcode + "'");
450 if (! barcode) { dofocus(); return false; } // no barcode
451 if (barcode == "__KOHA_NEW_CIRC__") { // magic barcode
452 window.location.href='/cgi-bin/koha/sco/sco-main.pl?op=logout';
457 [% IF Koha.Preference('AudioAlerts') %]
458 var AUDIO_ALERTS = JSON.parse( "[% To.json(AudioAlerts.AudioAlerts) | $raw %]" );
459 $( document ).ready(function() {
460 if ( AUDIO_ALERTS ) {
461 for ( var k in AUDIO_ALERTS ) {
462 var alert = AUDIO_ALERTS[k];
463 if ( $( alert.selector ).length ) {
464 playSound( alert.sound );
470 function playSound( sound ) {
471 if ( ( sound.indexOf('http://') == 0 || sound.indexOf('https://') == 0 ) ) {
472 document.getElementById("audio-alert").innerHTML = '<audio src="' + sound + '" autoplay="autoplay" autobuffer="autobuffer"></audio>';
478 $(document).ready(function() {
480 [% IF ( patronid ) %]sco_init();[% END %]
481 $("#loanTable").dataTable($.extend(true, {}, dataTablesDefaults, {
484 { "targets": [ "nosort" ], "sortable": false, "searchable": false },
485 { "targets": [ "noshow" ], "visible": false, "searchable": false },
486 { "type": "anti-the", "targets" : [ "anti-the" ] },
487 { "type": "title-string", "targets" : [ "title-string" ] }
491 $("#logout_form").on("click", function(e){
493 clearTimeout(mainTimeout);
494 [% IF Koha.Preference('SelfCheckReceiptPrompt') %]
495 var confirmStart = Date.now();
496 confirmModal("", _("Would you like to print a receipt?"), _("Print receipt and end session"), _("End session"), function(result) {
497 if ( result && (Date.now() - confirmStart) < [% SelfCheckTimeout | html %] ) {
498 var win = window.open("/cgi-bin/koha/sco/printslip.pl?borrowernumber=[% borrowernumber | html %]&print=qslip");
499 location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout';
501 location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout';
505 location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout';
514 [% IF ( Koha.Preference('SCOUserJS') ) %]<script>[% Koha.Preference('SCOUserJS') | $raw %]</script>[% END %]