7 [% INCLUDE 'doc-head-open.inc' %]
8 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha [% END %] › Self checkout </title>
9 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
10 <meta name="generator" content="Koha [% Version | html %]" /> <!-- leave this for stats -->
11 <link rel="shortcut icon" href="[% IF ( Koha.Preference('OpacFavicon') ) %][% Koha.Preference('OpacFavicon') | url %][% ELSE %][% interface | html %]/[% theme | html %]/images/favicon.ico[% END %]" type="image/x-icon" />
12 [% Asset.css("lib/bootstrap/css/bootstrap.min.css") | $raw %]
13 [% Asset.css("lib/jquery/jquery-ui.css") | $raw %]
14 [% Asset.css("css/sco.css") | $raw %]
15 [% IF ( Koha.Preference('OPACUserCSS') ) %]<style>[% Koha.Preference('OPACUserCSS') | $raw %]</style>[% END %]
16 [% IF ( Koha.Preference('SCOUserCSS') ) %]<style>[% Koha.Preference('SCOUserCSS') | $raw %]</style>[% END %]
18 <script src="[% interface | html %]/[% theme | html %]/lib/respond.min.js"></script>
21 function _(s) { return s } // dummy function for gettext
23 [% Asset.js("lib/modernizr.min.js") | $raw %]
25 <body id="sco_main" class="sco" onload="dofocus();" onunload="mungeHistory();">
26 [% INCLUDE 'masthead-sco.inc' %]
29 <div class="container-fluid">
30 <div class="row-fluid">
31 [% IF ( display_patron_image ) %]
37 <div id="masthead"><h1>[% LibraryName | html %] Self checkout system</h1></div>
39 [% IF ( impossible ) %]<!-- We tried to issue, but failed. -->
41 <h3>Item cannot be checked out.</h3>
42 <p>Sorry, this item cannot be checked out at this station.</p>
44 <p>Title: <em>[% title | html %]</em> </p>
48 [% IF ( circ_error_UNKNOWN_BARCODE ) %]
49 The system does not recognize this barcode.
50 [% ELSIF ( circ_error_max_loans_allowed ) %]
51 You have checked out too many items and can't check out any more.
52 [% ELSIF ( circ_error_ISSUED_TO_ANOTHER ) %]
53 This item is checked out to someone else.
54 [% ELSIF ( circ_error_NO_MORE_RENEWALS ) %]
55 You cannot renew this item again.
56 [% ELSIF ( circ_error_NOT_FOR_LOAN ) %]
57 This item is not for loan.
58 [% ELSIF ( circ_error_DEBT ) %]
59 You owe the library [% DEBT | $Price %] and cannot check out.
60 [% ELSIF ( circ_error_WTHDRAWN ) %]
61 This item has been withdrawn from the collection.
62 [% ELSIF ( circ_error_RESTRICTED ) %]
63 This item is restricted.
64 [% ELSIF ( circ_error_RESERVED ) %]
65 This item is on hold for another patron.
66 [% ELSIF ( circ_error_ITEMNOTSAMEBRANCH ) %]
67 This item belongs to another branch.
68 [% ELSIF ( circ_error_EXPIRED ) %]
69 Your account has expired.
70 [% ELSIF ( circ_error_DEBARRED ) %]
71 Your account has been suspended.
72 [% ELSIF ( circ_error_CARD_LOST ) %]
73 This card has been declared lost.
74 [% ELSIF ( circ_error_GNA ) %]
75 Your contact information seems to be incomplete.
76 [% ELSIF ( circ_error_INVALID_DATE ) %]
77 Due date is not valid.
79 Please see a member of the library staff.
82 [% IF ( returnitem && Koha.Preference('AllowSelfCheckReturns') ) %]
83 <form action="/cgi-bin/koha/sco/sco-main.pl" name="errorForm" class="inline" method="post">
84 <input type="hidden" name="op" value="returnbook" />
85 <input type="hidden" name="patronid" value="[% patronid | html %]" />
86 <input type="hidden" name="barcode" value="[% barcode | html %]" />
87 <input type="hidden" name="newissues" value="[% newissues | html %]" />
88 <button type="submit" name="returnbook" class="btn"><i class="return"></i> Return this item</button>
92 <form action="/cgi-bin/koha/sco/sco-main.pl" name="errorForm" class="inline" method="post">
93 <input type="hidden" name="op" value="" />
94 <input type="hidden" name="patronid" value="[% patronid | html %]" />
95 <input type="hidden" name="barcode" value="[% barcode | html %]" />
96 <input type="hidden" name="newissues" value="[% newissues | html %]" />
97 <input type="submit" name= "confirm" value="Return to account summary" class="btn back focus" />
99 </div> <!-- / .alert -->
100 [% END # / IF ( impossible %]
102 [% IF ( confirm ) %]<!-- We need to confirm the issue.. -->
103 <div class="alert"><h3>Please confirm the checkout:</h3>
104 [% IF ( confirm_renew_issue ) %]
105 <p>This item is already checked out to you.</p>
108 [% IF ( renew && Koha.Preference('AllowSelfCheckReturns') ) %]
109 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
110 <input type="hidden" name="op" value="returnbook" />
111 <input type="hidden" name="patronid" value="[% patronid | html %]" />
112 <input type="hidden" name="barcode" value="[% barcode | html %]" />
113 <input type="hidden" name="confirmed" value="" />
114 <input type="hidden" name="newissues" value="[% newissues | html %]" />
115 <button type="submit" name="returnbook" class="btn"><i class="icon return"></i> Return this item</button>
119 [% UNLESS ( renew ) %]
120 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
121 <input type="hidden" name="op" value="checkout" />
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="1" />
125 <input type="hidden" name="newissues" value="[% newissues | html %]" />
126 <button type="submit" name="confirm" class="btn"><i class="icon renew"></i> Renew item</button>
129 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
130 <input type="hidden" name="op" value="checkout" />
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" class="btn"><i class="icon renew"></i> Renew item</button>
139 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
140 <input type="hidden" name="op" value="" />
141 <input type="hidden" name="patronid" value="[% patronid | html %]" />
142 <input type="hidden" name="newissues" value="[% newissues | html %]" />
143 <button type="submit" class="btn"><i class="icon cancel"></i> Cancel</button>
146 [% END # / IF confirm %]
148 [% IF ( nopermission ) %]
149 <!-- This is what is displayed if user doesn't have permission -->
151 <h3>Access denied</h3>
152 <p>Sorry, this self-checkout station has lost authentication. Please contact the administrator to resolve this problem.</p>
156 [% IF ( different_ip ) %]
157 <!-- This is what is displayed if user doesn't have permission -->
159 <h3>Session lost</h3>
160 <p>You are accessing self-checkout from a different IP address! please log in again.</p>
164 [% IF ( invalid_username_or_password ) %]
165 <!-- This is what is displayed if user doesn't have permission -->
167 <h3>Record not found</h3>
168 <p>Your userid was not found in the database. Please try again.</p>
173 [% UNLESS ( hide_main ) %]
175 [% IF ( patronid ) %]
176 [% IF ( validuser ) %]
177 <div class="alert alert-info">You are logged in as [% borrowername | html %].</div>
178 [% INCLUDE 'opac-note.inc' %]
179 [% IF patron_has_hold_fee %]
180 <div class="alert">A hold fee was charged to your account for collecting this item.</div>
187 <p>The userid <strong>[% patronid | html %]</strong> was not found in the database. Please try again.</p>
190 [% END # / IF patronid %]
192 [% IF ( validuser ) %]
193 <div id="newcheckout" class="sco_entry">
194 <form id="scan_form" name="scan_form" method="post" action="/cgi-bin/koha/sco/sco-main.pl" onsubmit="return checkout_confirm('[% patronid | html %]');">
196 <legend>Check out[% IF ( Koha.Preference('AllowSelfCheckReturns') ) %], return[% END %] or renew an item: </legend>
197 <div class="input-append">
198 <label for="barcode">Scan a new item or enter its barcode:</label>
199 <input id="barcode" name="barcode" size="20" type="text" class="focus" autocomplete="off" />
200 <button type="submit" class="btn">Submit</button>
202 <input type="hidden" name="op" value="checkout" />
203 <input type="hidden" name="patronid" value="[% patronid | html %]" />
204 <input type="hidden" name="newissues" value="[% newissues | html %]" />
209 <form method="post" action="#" id="logout_form">
210 <button type="submit" class="btn"><i class="icon finish"></i> Finish</button>
213 </div> <!-- / #newcheckout -->
214 </div> <!-- / .span12/12 -->
215 [% IF ( display_patron_image ) %]
217 <img src="/cgi-bin/koha/sco/sco-patron-image.pl?borrowernumber=[% borrowernumber | html %]&csrf_token=[% csrf_token | html %]" alt="" />
220 </div> <!-- / .row-fluid -->
221 </div> <!-- / .container-fluid -->
223 <div class="container-fluid">
224 <div class="row-fluid">
226 <div id="borrowerdetails">
227 [% IF ( issues_count ) %]
228 <table id="loanTable" class="table table-bordered table-striped">
229 <caption>Checkouts for [% borrowername | html %] <span class="count">([% issues_count | html %] total)</span></caption>
230 <!-- ISSUES TABLE ROWS -->
233 <th class="noshow">Checked out on</th>
234 <th class="anti-the">Title</th>
236 <th class="title-string">Due</th>
237 <th class="nosort">Renew</th>
238 [% UNLESS ( nofines ) %]
244 [% FOREACH ISSUE IN ISSUES %]
246 <td>[% ISSUE.issuedate | html %]</td>
248 [% UNLESS ( noitemlinks ) %]
249 <a href="/cgi-bin/koha/opac-detail.pl?bib=[% ISSUE. biblionumber | uri %]">[% ISSUE.title | html %]</a>
251 <strong>[% ISSUE.title | html %]</strong>
253 [% IF ( newissues.match(ISSUE.barcode)) %]
254 <span class="label label-info">NEW</span>
256 <span class="item-details">[% ISSUE.author | html %]</span>
257 ([% ISSUE.barcode | html %])
259 <td>[% ISSUE.itemcallnumber | html %]</td>
260 [% IF ( ISSUE.overdue ) %]
261 <td class="overdue"><span title="[% ISSUE.date_due | html %]">[% ISSUE.date_due | $KohaDates as_due_date => 1 %]</span></td>
263 <td><span title="[% ISSUE.date_due | html %]">[% ISSUE.date_due | $KohaDates as_due_date => 1 %]</span></td>
266 <form action="/cgi-bin/koha/sco/sco-main.pl" method="post">
267 <input type="hidden" name="patronid" value="[% patronid | html %]" />
268 <input type="hidden" name="barcode" value="[% ISSUE.barcode | html %]" />
269 <input type="hidden" name="newissues" value="[% newissues | html %]" />
270 [% IF ISSUE.can_be_renewed %]
271 <input type="hidden" name="op" value="checkout" />
272 <input type="hidden" name="confirmed" value="1" />
273 [% UNLESS ( ISSUE.renew ) %]
274 <input type="submit" value="Renew item" name="confirm " class="btn renew" />
276 <input type="submit" value="Renew item" class="btn renew" />
279 [% IF ISSUE.renew_error == 'auto_renew' OR ISSUE.renew_error == 'auto_too_soon' %]
280 <span>This item has been scheduled for automatic renewal and cannot be renewed</span>
281 [% ELSIF ISSUE.renew_error == 'onsite_checkout' %]
282 <span>This is a on-site checkout, it cannot be renewed.</span>
284 <span>No renewals allowed</span>
286 [% IF Koha.Preference('AllowSelfCheckReturns') %]
287 <input type="submit" value="Check in item" name="confirm" class="btn return" />
288 <input type="hidden" name="op" value="returnbook" />
289 <input type="hidden" name="confirmed" value="" />
294 [% UNLESS ( nofines ) %]
296 [% IF ( ISSUE.charges ) %]Yes[% ELSE %]No[% END %]
300 [% END # / FOREACH ISSUE %]
304 <h3>You currently have nothing checked out.</h3>
305 [% END # / IF issues_count %]
306 </div> <!-- / #borrowerdetails -->
307 [% ELSE # IF validuser %]
308 <div class="sco_entry" >
309 <form id="mainform" action="/cgi-bin/koha/sco/sco-main.pl" name="mainform" method="post">
310 <fieldset class="checkout brief">
311 [% IF ( Koha.Preference('SelfCheckoutByLogin') ) %]
312 <legend>Log in to your account</legend>
313 <label for="patronlogin">Login:</label>
314 <input type="text" id="patronlogin" class="focus" size="20" name="patronlogin" />
315 <label for="patronpw">Password:</label>
316 <input type="password" id="patronpw" size="20" name="patronpw" />
317 <fieldset class="action">
318 <button type="submit" class="btn">Log in</button>
321 <div class="input-append">
322 <label for="patronid">Please enter your card number:</label>
323 <input type="text" id="patronid" class="focus" size="20" name="patronid" autocomplete="off" />
324 <button type="submit" class="btn">Submit</button>
328 [% FOREACH INPUT IN INPUTS %]
329 <input type="hidden" name="[% INPUT.name | html %]" value="[% INPUT.value | html %]">
331 <input type="hidden" name="op" value="login" />
334 </div> <!-- / .sco_entry -->
335 [% END # / IF validuser %]
336 [% END # / UNLESS ( hide_main %]
337 [% IF ( Koha.Preference('SCOMainUserBlock' ) ) %]<div id="scomainuserblock">[% Koha.Preference('SCOMainUserBlock' ) | $raw %]</div>[% END %]
338 </div> <!-- / .span12 -->
339 </div> <!-- / .row-fluid -->
340 </div> <!-- / .container-fluid -->
341 </div> <!-- / .main -->
342 <span id="audio-alert"></span>
344 [% INCLUDE 'opac-bottom.inc' %]
345 [% BLOCK jsinclude %]
346 [% INCLUDE 'datatables.inc' %]
349 function mungeHistory() {
350 // prevent back button from allowing form resubmission
351 if (history && history.pushState) {
352 history.replaceState(null, document.title, window.location.href);
356 function sco_init() {
357 mainTimeout = setTimeout(function() {
358 location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout';
359 }, [% SelfCheckTimeout | html %]);
361 function dofocus() { // named function req'd for body onload event by some FF and IE7 security models
362 // alert("dofocus called");
363 $(".focus:last").select();
365 var slip_re = /slip/;
366 function printx_window(print_type) {
367 var handler = print_type.match(slip_re) ? "printslip" : "moremember";
371 function checkout_confirm(patronid) {
372 var barcode = $("#barcode").val();
373 // alert("checkout_confirm('" + patronid + "') called for barcode '" + barcode + "'");
374 if (! barcode) { dofocus(); return false; } // no barcode
375 if (barcode == "__KOHA_NEW_CIRC__") { // magic barcode
376 window.location.href='/cgi-bin/koha/sco/sco-main.pl?op=logout';
381 [% IF Koha.Preference('AudioAlerts') %]
382 var AUDIO_ALERTS = JSON.parse( '[% AudioAlerts.AudioAlerts | replace( "'", "\\'" ) | replace( '"', '\\"' ) | html %]' );
383 $( document ).ready(function() {
384 if ( AUDIO_ALERTS ) {
385 for ( var k in AUDIO_ALERTS ) {
386 var alert = AUDIO_ALERTS[k];
387 if ( $( alert.selector ).length ) {
388 playSound( alert.sound );
394 function playSound( sound ) {
395 if ( ( sound.indexOf('http://') == 0 || sound.indexOf('https://') == 0 ) ) {
396 document.getElementById("audio-alert").innerHTML = '<audio src="' + sound + '" autoplay="autoplay" autobuffer="autobuffer"></audio>';
402 $(document).ready(function() {
404 [% IF ( patronid ) %]sco_init();[% END %]
405 $("#loanTable").dataTable($.extend(true, {}, dataTablesDefaults, {
408 { "targets": [ "nosort" ], "sortable": false, "searchable": false },
409 { "targets": [ "noshow" ], "visible": false, "searchable": false },
410 { "type": "anti-the", "targets" : [ "anti-the" ] },
411 { "type": "title-string", "targets" : [ "title-string" ] }
415 $("#logout_form").submit(function(){
416 clearTimeout(mainTimeout);
417 [% IF Koha.Preference('SelfCheckReceiptPrompt') %]
418 var confirmStart = Date.now();
419 if(confirm(_("Would you like to print a receipt?"))){
420 if ( (Date.now() - confirmStart) < [% SelfCheckTimeout | html %] ) {
421 window.open("/cgi-bin/koha/sco/printslip.pl?borrowernumber=[% borrowernumber | html %]&print=qslip");
423 alert(_("Timeout while waiting for print confirmation"));
434 [% IF ( Koha.Preference('SCOUserJS') ) %]<script>[% Koha.Preference('SCOUserJS') | $raw %]</script>[% END %]