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.
86 [% ELSIF ( circ_error_ADDITIONAL_MATERIALS ) %]
87 Item must be checked out at a circulation desk.
89 Please see a member of the library staff.
92 [% IF ( returnitem && Koha.Preference('SCOAllowCheckin') ) %]
93 <form action="/cgi-bin/koha/sco/sco-main.pl" name="errorForm" class="inline" method="post">
94 <input type="hidden" name="op" value="returnbook" />
95 <input type="hidden" name="patronid" value="[% patronid | html %]" />
96 <input type="hidden" name="barcode" value="[% barcode | html %]" />
97 <input type="hidden" name="newissues" value="[% newissues | html %]" />
98 <button type="submit" name="returnbook" class="btn btn-primary"><i class="fa fa-undo" aria-hidden="true"></i> Return this item</button>
102 <form action="/cgi-bin/koha/sco/sco-main.pl" name="errorForm" class="inline" method="post">
103 <input type="hidden" name="op" value="" />
104 <input type="hidden" name="patronid" value="[% patronid | html %]" />
105 <input type="hidden" name="barcode" value="[% barcode | html %]" />
106 <input type="hidden" name="newissues" value="[% newissues | html %]" />
107 <input type="submit" name= "confirm" value="Return to account summary" class="btn btn-info back focus" />
109 </div> <!-- / .alert -->
110 [% END # / IF ( impossible %]
112 [% IF ( confirm ) %]<!-- We need to confirm the issue.. -->
113 <div class="alert alert-warning"><h3>Please confirm the checkout:</h3>
114 <span class="sco-alert-warning confirm"></span>
115 [% IF ( confirm_renew_issue ) %]
116 <p>This item is already checked out to you.</p>
119 [% IF ( renew && Koha.Preference('SCOAllowCheckin') ) %]
120 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
121 <input type="hidden" name="op" value="returnbook" />
122 <input type="hidden" name="patronid" value="[% patronid | html %]" />
123 <input type="hidden" name="barcode" value="[% barcode | html %]" />
124 <input type="hidden" name="confirmed" value="" />
125 <input type="hidden" name="newissues" value="[% newissues | html %]" />
126 <button type="submit" name="returnbook" class="btn btn-primary"><i class="fa fa-undo" aria-hidden="true"></i> Return this item</button>
130 [% UNLESS ( renew ) %]
131 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
132 <input type="hidden" name="op" value="renew" />
133 <input type="hidden" name="patronid" value="[% patronid | html %]" />
134 <input type="hidden" name="barcode" value="[% barcode | html %]" />
135 <input type="hidden" name="confirmed" value="1" />
136 <input type="hidden" name="seen" value="1" />
137 <input type="hidden" name="newissues" value="[% newissues | html %]" />
138 <button type="submit" name="confirm" class="btn btn-primary"><i class="fa fa-refresh" aria-hidden="true"></i> Renew item</button>
141 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
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="seen" value="1" />
147 <input type="hidden" name="newissues" value="[% newissues | html %]" />
148 <button type="submit" class="btn btn-primary"><i class="fa fa-refresh" aria-hidden="true"></i> Renew item</button>
152 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
153 <input type="hidden" name="op" value="" />
154 <input type="hidden" name="patronid" value="[% patronid | html %]" />
155 <input type="hidden" name="newissues" value="[% newissues | html %]" />
156 <button type="submit" class="btn btn-primary"><i class="fa fa-cancel" aria-hidden="true"></i> Cancel</button>
159 [% END # / IF confirm %]
161 [% IF ( nopermission ) %]
162 <!-- This is what is displayed if user doesn't have permission -->
163 <div class="alert alert-warning">
164 <span class="sco-alert-warning nopermission"></span>
165 <h3>Access denied</h3>
166 <p>Sorry, this self-checkout station has lost authentication. Please contact the administrator to resolve this problem.</p>
170 [% IF ( different_ip ) %]
171 <!-- This is what is displayed if user doesn't have permission -->
172 <div class="alert alert-warning">
173 <span class="sco-alert-warning sessionlost"></span>
174 <h3>Session lost</h3>
175 <p>You are accessing self-checkout from a different IP address! please log in again.</p>
179 [% IF ( invalid_username_or_password ) %]
180 <!-- This is what is displayed if user doesn't have permission -->
181 <div class="alert alert-warning">
182 <span class="sco-alert-warning notfound"></span>
183 <h3>Record not found</h3>
184 <p>Your userid was not found in the database. Please try again.</p>
189 <span class="sco-alert-success issue"></span>
190 <div class="alert alert-info">
191 <p>Item checked out</p>
193 [% ELSIF ( renewed ) %]
194 <span class="sco-alert-success renew"></span>
195 <div class="alert alert-info">
198 [% ELSIF ( returned == 0 ) %]
199 <span class="sco-alert-warning return"></span>
200 <div class="alert alert-info">
201 <p>Item not checked in: please see circulation staff for assistance</p>
203 [% ELSIF ( returned == 1 ) %]
204 <span class="sco-alert-success return"></span>
205 <div class="alert alert-info">
206 <p>Item checked in</p>
211 [% UNLESS ( hide_main ) %]
213 [% IF ( patronid ) %]
214 [% IF ( validuser ) %]
215 <div class="alert alert-info">You are logged in as [% borrowername | html %].</div>
216 [% INCLUDE 'opac-note.inc' %]
217 [% IF patron_has_hold_fee %]
218 <div class="alert alert-warning">A hold fee was charged to your account for collecting this item.</div>
223 <div class="alert alert-warning">
225 <p>The userid <strong>[% patronid | html %]</strong> was not found in the database. Please try again.</p>
228 [% END # / IF patronid %]
230 [% IF ( validuser ) %]
231 <div id="newcheckout" class="sco_entry">
232 <form id="scan_form" name="scan_form" method="post" action="/cgi-bin/koha/sco/sco-main.pl" onsubmit="return checkout_confirm('[% patronid | html %]');">
234 [% IF ( Koha.Preference('SCOAllowCheckin') ) %]
235 Check out, return, or renew an item:
237 Check out or renew an item:
242 <label for="barcode">Scan a new item or enter its barcode:</label>
245 <input id="barcode" name="barcode" size="20" type="text" class="focus form-control" autocomplete="off" />
247 <div class="col-auto">
248 <button type="submit" class="btn btn-primary">Submit</button>
250 <div class="col ml-auto">
251 <button type="button" id="logout_form" class="btn btn-info"><i class="fa fa-check" aria-hidden="true"></i> Finish</button>
252 <input type="hidden" name="op" value="checkout" />
253 <input type="hidden" name="patronid" value="[% patronid | html %]" />
254 <input type="hidden" name="newissues" value="[% newissues | html %]" />
256 </div> <!-- /.row -->
257 </form> <!-- /#scan_form -->
258 </div> <!-- / #newcheckout -->
259 </div> <!-- / .span12/12 -->
260 [% IF ( display_patron_image ) %]
261 <div class="col-lg-2">
262 <img src="/cgi-bin/koha/sco/sco-patron-image.pl?borrowernumber=[% borrowernumber | uri %]&csrf_token=[% csrf_token | uri %]" alt="" />
265 </div> <!-- / .row -->
266 </div> <!-- / .container-fluid -->
268 <div class="container-fluid">
270 <div class="col order-first order-md-first order-lg-2">
271 <ul class="nav nav-tabs" role="tablist">
272 <li class="nav-item" role="presentation">
273 <a class="nav-link active" href="#checkouts-tab" id="checkouts" aria-controls="home" aria-selected="true" data-toggle="tab">Checkouts ([% issues_count | html %])</a>
275 <li class="nav-item" role="presentation">
276 <a class="nav-link" href="#holds-tab" id="holds" aria-controls="home" aria-selected="false" data-toggle="tab">
277 [% IF waiting_holds_count %]
278 <i class="fa fa-exclamation" aria-hidden="true"></i>
280 Holds ([% HOLDS.count | html %])
283 <li class="nav-item" role="presentation">
284 <a class="nav-link" href="#account-tab" id="account" aria-controls="home" aria-selected="false" data-toggle="tab">Charges ([% total | $Price %])</a>
287 <div class="tab-content">
288 <div id="checkouts-tab" class="tab-pane show active" aria-labelledby="checkouts">
289 <div id="borrowerdetails">
290 [% IF ( issues_count ) %]
291 <table id="loanTable" class="table table-bordered table-striped">
292 <caption>Checkouts for [% borrowername | html %] <span class="count">([% issues_count | html %] total)</span></caption>
293 <!-- ISSUES TABLE ROWS -->
296 <th class="noshow">Checked out on</th>
297 <th class="anti-the">Title</th>
299 <th class="title-string">Due</th>
300 <th class="nosort">Renew</th>
301 [% UNLESS ( nofines ) %]
307 [% FOREACH ISSUE IN ISSUES %]
309 <td>[% ISSUE.issuedate | html %]</td>
311 [% UNLESS ( noitemlinks ) %]
312 <a href="/cgi-bin/koha/opac-detail.pl?bib=[% ISSUE. biblionumber | uri %]">[% ISSUE.title | html %]</a>
314 <strong>[% ISSUE.title | html %]</strong>
316 [% IF ( newissues.match(ISSUE.barcode)) %]
317 <span class="label label-info">NEW</span>
319 <span class="item-details">[% ISSUE.author | html %]</span>
320 ([% ISSUE.barcode | html %])
322 <td>[% ISSUE.itemcallnumber | html %]</td>
323 [% IF ( ISSUE.overdue ) %]
324 <td class="overdue"><span title="[% ISSUE.date_due | html %]">[% ISSUE.date_due | $KohaDates as_due_date => 1 %]</span></td>
326 <td><span title="[% ISSUE.date_due | html %]">[% ISSUE.date_due | $KohaDates as_due_date => 1 %]</span></td>
329 <form action="/cgi-bin/koha/sco/sco-main.pl" method="post">
330 <input type="hidden" name="patronid" value="[% patronid | html %]" />
331 <input type="hidden" name="barcode" value="[% ISSUE.barcode | html %]" />
332 <input type="hidden" name="newissues" value="[% newissues | html %]" />
333 [% IF ISSUE.can_be_renewed %]
334 <input type="hidden" name="op" value="renew" />
335 <input type="hidden" name="confirmed" value="1" />
336 [% UNLESS ( ISSUE.renew ) %]
337 <input type="submit" value="Renew item" name="confirm " class="btn btn-primary btn-sm renew" />
339 <input type="submit" value="Renew item" class="btn btn-primary btn-sm renew" />
342 [% IF ISSUE.renew_error == 'auto_renew' OR ISSUE.renew_error == 'auto_too_soon' %]
343 <span>This item has been scheduled for automatic renewal and cannot be renewed</span>
344 [% ELSIF ISSUE.renew_error == 'onsite_checkout' %]
345 <span>This is a on-site checkout, it cannot be renewed.</span>
346 [% ELSIF ISSUE.renew_error == 'too_unseen' %]
347 <span>You have renewed this item the maximum number of consecutive times without it being seen by the library.</span>
349 <span>No renewals allowed</span>
351 [% IF Koha.Preference('SCOAllowCheckin') %]
352 <input type="submit" value="Check in item" name="confirm" class="btn btn-info btn-sm return" />
353 <input type="hidden" name="op" value="returnbook" />
354 <input type="hidden" name="confirmed" value="" />
359 [% UNLESS ( nofines ) %]
361 [% IF ( ISSUE.charges ) %]Yes[% ELSE %]No[% END %]
365 [% END # / FOREACH ISSUE %]
369 <h3>You currently have nothing checked out.</h3>
370 [% END # / IF issues_count %]
371 </div> <!-- / #borrowerdetails -->
373 <div id="holds-tab" class="tab-pane" role="tabpanel" aria-labelledby="holds">
374 [% IF HOLDS.count > 0 %]
375 [% PROCESS 'holds-table.inc' HOLDS = HOLDS, SuspendHoldsOpac = SuspendHoldsOpac, showpriority = showpriority, AutoResumeSuspendedHolds = AutoResumeSuspendedHolds, onlyinfo = 'true' %]
377 <h3>You currently have no pending holds.</h3>
380 <div id="account-tab" class="tab-pane" role="tabpanel" aria-labelledby="account">
381 [% PROCESS 'account-table.inc' %]
384 [% ELSE # IF validuser %]
385 <div class="sco_entry" >
386 <form id="mainform" action="/cgi-bin/koha/sco/sco-main.pl" name="mainform" method="post">
388 [% IF ( Koha.Preference('SelfCheckoutByLogin') ) %]
389 <legend>Log in to your account</legend>
390 <label for="patronlogin">Login:</label>
391 <input type="text" id="patronlogin" class="focus noEnterSubmit" size="20" name="patronlogin" />
392 <label for="patronpw">Password:</label>
393 <input type="password" id="patronpw" size="20" name="patronpw" />
394 <fieldset class="action">
395 <button type="submit" class="btn btn-primary">Log in</button>
398 <div class="form-row">
399 <div class="col-auto">
400 <label for="patronid">Please enter your card number:</label>
403 <input type="text" id="patronid" class="form-control focus" size="20" name="patronid" autocomplete="off" />
405 <div class="col-auto">
406 <button type="submit" class="btn btn-primary">Submit</button>
408 </div> <!-- /.form-row -->
411 [% FOREACH INPUT IN INPUTS %]
412 <input type="hidden" name="[% INPUT.name | html %]" value="[% INPUT.value | html %]">
414 <input type="hidden" name="op" value="login" />
417 </div> <!-- / .sco_entry -->
418 [% END # / IF validuser %]
419 [% END # / UNLESS ( hide_main %]
420 [% IF ( Koha.Preference('SCOMainUserBlock' ) ) %]<div id="scomainuserblock">[% Koha.Preference('SCOMainUserBlock' ) | $raw %]</div>[% END %]
421 </div> <!-- / .span12 -->
422 </div> <!-- / .row -->
423 </div> <!-- / .container-fluid -->
424 </div> <!-- / .main -->
425 <span id="audio-alert"></span>
427 [% INCLUDE 'opac-bottom.inc' %]
428 [% BLOCK jsinclude %]
429 [% INCLUDE 'datatables.inc' %]
431 function mungeHistory() {
432 // prevent back button from allowing form resubmission
433 if (history && history.pushState) {
434 history.replaceState(null, document.title, window.location.href);
438 function sco_init() {
439 mainTimeout = setTimeout(function() {
440 location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout';
441 }, [% SelfCheckTimeout | html %]);
443 function dofocus() { // named function req'd for body onload event by some FF and IE7 security models
444 // alert("dofocus called");
445 $(".focus:last").select();
447 var slip_re = /slip/;
448 function printx_window(print_type) {
449 var handler = print_type.match(slip_re) ? "printslip" : "moremember";
453 function checkout_confirm(patronid) {
454 var barcode = $("#barcode").val();
455 // alert("checkout_confirm('" + patronid + "') called for barcode '" + barcode + "'");
456 if (! barcode) { dofocus(); return false; } // no barcode
457 if (barcode == "__KOHA_NEW_CIRC__") { // magic barcode
458 window.location.href='/cgi-bin/koha/sco/sco-main.pl?op=logout';
463 [% IF Koha.Preference('AudioAlerts') %]
464 var AUDIO_ALERTS = JSON.parse( "[% To.json(AudioAlerts.AudioAlerts) | $raw %]" );
465 $( document ).ready(function() {
466 if ( AUDIO_ALERTS ) {
467 for ( var k in AUDIO_ALERTS ) {
468 var alert = AUDIO_ALERTS[k];
469 if ( $( alert.selector ).length ) {
470 playSound( alert.sound );
476 function playSound( sound ) {
477 if ( ( sound.indexOf('http://') == 0 || sound.indexOf('https://') == 0 ) ) {
478 document.getElementById("audio-alert").innerHTML = '<audio src="' + sound + '" autoplay="autoplay" autobuffer="autobuffer"></audio>';
484 $(document).ready(function() {
486 [% IF ( patronid ) %]sco_init();[% END %]
487 $("#loanTable").dataTable($.extend(true, {}, dataTablesDefaults, {
490 { "targets": [ "nosort" ], "sortable": false, "searchable": false },
491 { "targets": [ "noshow" ], "visible": false, "searchable": false },
492 { "type": "anti-the", "targets" : [ "anti-the" ] },
493 { "type": "title-string", "targets" : [ "title-string" ] }
497 $("#logout_form").on("click", function(e){
499 clearTimeout(mainTimeout);
500 [% IF Koha.Preference('SelfCheckReceiptPrompt') %]
501 var confirmStart = Date.now();
502 confirmModal("", _("Would you like to print a receipt?"), _("Print receipt and end session"), _("End session"), function(result) {
503 if ( result && (Date.now() - confirmStart) < [% SelfCheckTimeout | html %] ) {
504 var win = window.open("/cgi-bin/koha/sco/printslip.pl?borrowernumber=[% borrowernumber | html %]&print=qslip");
505 location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout';
507 location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout';
511 location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout';
520 [% IF ( Koha.Preference('SCOUserJS') ) %]<script>[% Koha.Preference('SCOUserJS') | $raw %]</script>[% END %]