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 <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" />
13 [% Asset.css("lib/bootstrap/css/bootstrap.min.css") | $raw %]
14 [% Asset.css("lib/jquery/jquery-ui.css") | $raw %]
15 [% Asset.css("css/sco.css") | $raw %]
16 [% IF ( Koha.Preference('OPACUserCSS') ) %]<style>[% Koha.Preference('OPACUserCSS') | $raw %]</style>[% END %]
17 [% IF ( Koha.Preference('SCOUserCSS') ) %]<style>[% Koha.Preference('SCOUserCSS') | $raw %]</style>[% END %]
19 <script src="[% interface | html %]/[% theme | html %]/lib/respond.min.js"></script>
22 function _(s) { return s } // dummy function for gettext
24 [% Asset.js("lib/modernizr.min.js") | $raw %]
26 <body id="sco_main" class="sco" onload="dofocus();" onunload="mungeHistory();">
27 [% INCLUDE 'masthead-sco.inc' %]
30 <div class="container-fluid">
31 <div class="row-fluid">
32 [% IF ( display_patron_image ) %]
38 <div id="masthead"><h1>[% LibraryName | html %] Self checkout system</h1></div>
40 [% IF ( impossible ) %]<!-- We tried to issue, but failed. -->
42 <h3>Item cannot be checked out.</h3>
43 <p>Sorry, this item cannot be checked out at this station.</p>
45 <p>Title: <em>[% title | html %]</em> </p>
49 [% IF ( circ_error_UNKNOWN_BARCODE ) %]
50 The system does not recognize this barcode.
51 [% ELSIF ( circ_error_max_loans_allowed ) %]
52 You have checked out too many items and can't check out any more.
53 [% ELSIF ( circ_error_ISSUED_TO_ANOTHER ) %]
54 This item is checked out to someone else.
55 [% ELSIF ( circ_error_NO_MORE_RENEWALS ) %]
56 You cannot renew this item again.
57 [% ELSIF ( circ_error_NOT_FOR_LOAN ) %]
58 This item is not for loan.
59 [% ELSIF ( circ_error_DEBT ) %]
60 You owe the library [% DEBT | $Price %] and cannot check out.
61 [% ELSIF ( circ_error_WTHDRAWN ) %]
62 This item has been withdrawn from the collection.
63 [% ELSIF ( circ_error_RESTRICTED ) %]
64 This item is restricted.
65 [% ELSIF ( circ_error_RESERVED ) %]
66 This item is on hold for another patron.
67 [% ELSIF ( circ_error_ITEMNOTSAMEBRANCH ) %]
68 This item belongs to another branch.
69 [% ELSIF ( circ_error_EXPIRED ) %]
70 Your account has expired.
71 [% ELSIF ( circ_error_DEBARRED ) %]
72 Your account has been suspended.
73 [% ELSIF ( circ_error_CARD_LOST ) %]
74 This card has been declared lost.
75 [% ELSIF ( circ_error_GNA ) %]
76 Your contact information seems to be incomplete.
77 [% ELSIF ( circ_error_INVALID_DATE ) %]
78 Due date is not valid.
80 Please see a member of the library staff.
83 [% IF ( returnitem && Koha.Preference('AllowSelfCheckReturns') ) %]
84 <form action="/cgi-bin/koha/sco/sco-main.pl" name="errorForm" class="inline" method="post">
85 <input type="hidden" name="op" value="returnbook" />
86 <input type="hidden" name="patronid" value="[% patronid | html %]" />
87 <input type="hidden" name="barcode" value="[% barcode | html %]" />
88 <input type="hidden" name="newissues" value="[% newissues | html %]" />
89 <button type="submit" name="returnbook" class="btn"><i class="return"></i> Return this item</button>
93 <form action="/cgi-bin/koha/sco/sco-main.pl" name="errorForm" class="inline" method="post">
94 <input type="hidden" name="op" value="" />
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 <input type="submit" name= "confirm" value="Return to account summary" class="btn back focus" />
100 </div> <!-- / .alert -->
101 [% END # / IF ( impossible %]
103 [% IF ( confirm ) %]<!-- We need to confirm the issue.. -->
104 <div class="alert"><h3>Please confirm the checkout:</h3>
105 [% IF ( confirm_renew_issue ) %]
106 <p>This item is already checked out to you.</p>
109 [% IF ( renew && Koha.Preference('AllowSelfCheckReturns') ) %]
110 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
111 <input type="hidden" name="op" value="returnbook" />
112 <input type="hidden" name="patronid" value="[% patronid | html %]" />
113 <input type="hidden" name="barcode" value="[% barcode | html %]" />
114 <input type="hidden" name="confirmed" value="" />
115 <input type="hidden" name="newissues" value="[% newissues | html %]" />
116 <button type="submit" name="returnbook" class="btn"><i class="icon return"></i> Return this item</button>
120 [% UNLESS ( renew ) %]
121 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
122 <input type="hidden" name="op" value="checkout" />
123 <input type="hidden" name="patronid" value="[% patronid | html %]" />
124 <input type="hidden" name="barcode" value="[% barcode | html %]" />
125 <input type="hidden" name="confirmed" value="1" />
126 <input type="hidden" name="newissues" value="[% newissues | html %]" />
127 <button type="submit" name="confirm" class="btn"><i class="icon renew"></i> Renew item</button>
130 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
131 <input type="hidden" name="op" value="checkout" />
132 <input type="hidden" name="patronid" value="[% patronid | html %]" />
133 <input type="hidden" name="barcode" value="[% barcode | html %]" />
134 <input type="hidden" name="confirmed" value="1" />
135 <input type="hidden" name="newissues" value="[% newissues | html %]" />
136 <button type="submit" class="btn"><i class="icon renew"></i> Renew item</button>
140 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
141 <input type="hidden" name="op" value="" />
142 <input type="hidden" name="patronid" value="[% patronid | html %]" />
143 <input type="hidden" name="newissues" value="[% newissues | html %]" />
144 <button type="submit" class="btn"><i class="icon cancel"></i> Cancel</button>
147 [% END # / IF confirm %]
149 [% IF ( nopermission ) %]
150 <!-- This is what is displayed if user doesn't have permission -->
152 <h3>Access denied</h3>
153 <p>Sorry, this self-checkout station has lost authentication. Please contact the administrator to resolve this problem.</p>
157 [% IF ( different_ip ) %]
158 <!-- This is what is displayed if user doesn't have permission -->
160 <h3>Session lost</h3>
161 <p>You are accessing self-checkout from a different IP address! please log in again.</p>
165 [% IF ( invalid_username_or_password ) %]
166 <!-- This is what is displayed if user doesn't have permission -->
168 <h3>Record not found</h3>
169 <p>Your userid was not found in the database. Please try again.</p>
174 <span class="sco-alert-success"></span>
175 <p>Item checked out</p>
179 [% UNLESS ( hide_main ) %]
181 [% IF ( patronid ) %]
182 [% IF ( validuser ) %]
183 <div class="alert alert-info">You are logged in as [% borrowername | html %].</div>
184 [% INCLUDE 'opac-note.inc' %]
185 [% IF patron_has_hold_fee %]
186 <div class="alert">A hold fee was charged to your account for collecting this item.</div>
193 <p>The userid <strong>[% patronid | html %]</strong> was not found in the database. Please try again.</p>
196 [% END # / IF patronid %]
198 [% IF ( validuser ) %]
199 <div id="newcheckout" class="sco_entry">
200 <form id="scan_form" name="scan_form" method="post" action="/cgi-bin/koha/sco/sco-main.pl" onsubmit="return checkout_confirm('[% patronid | html %]');">
202 <legend>Check out[% IF ( Koha.Preference('AllowSelfCheckReturns') ) %], return[% END %] or renew an item: </legend>
203 <div class="input-append">
204 <label for="barcode">Scan a new item or enter its barcode:</label>
205 <input id="barcode" name="barcode" size="20" type="text" class="focus" autocomplete="off" />
206 <button type="submit" class="btn">Submit</button>
208 <input type="hidden" name="op" value="checkout" />
209 <input type="hidden" name="patronid" value="[% patronid | html %]" />
210 <input type="hidden" name="newissues" value="[% newissues | html %]" />
215 <form method="post" action="#" id="logout_form">
216 <button type="submit" class="btn"><i class="icon finish"></i> Finish</button>
219 </div> <!-- / #newcheckout -->
220 </div> <!-- / .span12/12 -->
221 [% IF ( display_patron_image ) %]
223 <img src="/cgi-bin/koha/sco/sco-patron-image.pl?borrowernumber=[% borrowernumber | html %]&csrf_token=[% csrf_token | html %]" alt="" />
226 </div> <!-- / .row-fluid -->
227 </div> <!-- / .container-fluid -->
229 <div class="container-fluid">
230 <div class="row-fluid">
232 <div id="borrowerdetails">
233 [% IF ( issues_count ) %]
234 <table id="loanTable" class="table table-bordered table-striped">
235 <caption>Checkouts for [% borrowername | html %] <span class="count">([% issues_count | html %] total)</span></caption>
236 <!-- ISSUES TABLE ROWS -->
239 <th class="noshow">Checked out on</th>
240 <th class="anti-the">Title</th>
242 <th class="title-string">Due</th>
243 <th class="nosort">Renew</th>
244 [% UNLESS ( nofines ) %]
250 [% FOREACH ISSUE IN ISSUES %]
252 <td>[% ISSUE.issuedate | html %]</td>
254 [% UNLESS ( noitemlinks ) %]
255 <a href="/cgi-bin/koha/opac-detail.pl?bib=[% ISSUE. biblionumber | uri %]">[% ISSUE.title | html %]</a>
257 <strong>[% ISSUE.title | html %]</strong>
259 [% IF ( newissues.match(ISSUE.barcode)) %]
260 <span class="label label-info">NEW</span>
262 <span class="item-details">[% ISSUE.author | html %]</span>
263 ([% ISSUE.barcode | html %])
265 <td>[% ISSUE.itemcallnumber | html %]</td>
266 [% IF ( ISSUE.overdue ) %]
267 <td class="overdue"><span title="[% ISSUE.date_due | html %]">[% ISSUE.date_due | $KohaDates as_due_date => 1 %]</span></td>
269 <td><span title="[% ISSUE.date_due | html %]">[% ISSUE.date_due | $KohaDates as_due_date => 1 %]</span></td>
272 <form action="/cgi-bin/koha/sco/sco-main.pl" method="post">
273 <input type="hidden" name="patronid" value="[% patronid | html %]" />
274 <input type="hidden" name="barcode" value="[% ISSUE.barcode | html %]" />
275 <input type="hidden" name="newissues" value="[% newissues | html %]" />
276 [% IF ISSUE.can_be_renewed %]
277 <input type="hidden" name="op" value="checkout" />
278 <input type="hidden" name="confirmed" value="1" />
279 [% UNLESS ( ISSUE.renew ) %]
280 <input type="submit" value="Renew item" name="confirm " class="btn renew" />
282 <input type="submit" value="Renew item" class="btn renew" />
285 [% IF ISSUE.renew_error == 'auto_renew' OR ISSUE.renew_error == 'auto_too_soon' %]
286 <span>This item has been scheduled for automatic renewal and cannot be renewed</span>
287 [% ELSIF ISSUE.renew_error == 'onsite_checkout' %]
288 <span>This is a on-site checkout, it cannot be renewed.</span>
290 <span>No renewals allowed</span>
292 [% IF Koha.Preference('AllowSelfCheckReturns') %]
293 <input type="submit" value="Check in item" name="confirm" class="btn return" />
294 <input type="hidden" name="op" value="returnbook" />
295 <input type="hidden" name="confirmed" value="" />
300 [% UNLESS ( nofines ) %]
302 [% IF ( ISSUE.charges ) %]Yes[% ELSE %]No[% END %]
306 [% END # / FOREACH ISSUE %]
310 <h3>You currently have nothing checked out.</h3>
311 [% END # / IF issues_count %]
312 </div> <!-- / #borrowerdetails -->
313 [% ELSE # IF validuser %]
314 <div class="sco_entry" >
315 <form id="mainform" action="/cgi-bin/koha/sco/sco-main.pl" name="mainform" method="post">
316 <fieldset class="checkout brief">
317 [% IF ( Koha.Preference('SelfCheckoutByLogin') ) %]
318 <legend>Log in to your account</legend>
319 <label for="patronlogin">Login:</label>
320 <input type="text" id="patronlogin" class="focus" size="20" name="patronlogin" />
321 <label for="patronpw">Password:</label>
322 <input type="password" id="patronpw" size="20" name="patronpw" />
323 <fieldset class="action">
324 <button type="submit" class="btn">Log in</button>
327 <div class="input-append">
328 <label for="patronid">Please enter your card number:</label>
329 <input type="text" id="patronid" class="focus" size="20" name="patronid" autocomplete="off" />
330 <button type="submit" class="btn">Submit</button>
334 [% FOREACH INPUT IN INPUTS %]
335 <input type="hidden" name="[% INPUT.name | html %]" value="[% INPUT.value | html %]">
337 <input type="hidden" name="op" value="login" />
340 </div> <!-- / .sco_entry -->
341 [% END # / IF validuser %]
342 [% END # / UNLESS ( hide_main %]
343 [% IF ( Koha.Preference('SCOMainUserBlock' ) ) %]<div id="scomainuserblock">[% Koha.Preference('SCOMainUserBlock' ) | $raw %]</div>[% END %]
344 </div> <!-- / .span12 -->
345 </div> <!-- / .row-fluid -->
346 </div> <!-- / .container-fluid -->
347 </div> <!-- / .main -->
348 <span id="audio-alert"></span>
350 [% INCLUDE 'opac-bottom.inc' %]
351 [% BLOCK jsinclude %]
352 [% INCLUDE 'datatables.inc' %]
355 function mungeHistory() {
356 // prevent back button from allowing form resubmission
357 if (history && history.pushState) {
358 history.replaceState(null, document.title, window.location.href);
362 function sco_init() {
363 mainTimeout = setTimeout(function() {
364 location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout';
365 }, [% SelfCheckTimeout | html %]);
367 function dofocus() { // named function req'd for body onload event by some FF and IE7 security models
368 // alert("dofocus called");
369 $(".focus:last").select();
371 var slip_re = /slip/;
372 function printx_window(print_type) {
373 var handler = print_type.match(slip_re) ? "printslip" : "moremember";
377 function checkout_confirm(patronid) {
378 var barcode = $("#barcode").val();
379 // alert("checkout_confirm('" + patronid + "') called for barcode '" + barcode + "'");
380 if (! barcode) { dofocus(); return false; } // no barcode
381 if (barcode == "__KOHA_NEW_CIRC__") { // magic barcode
382 window.location.href='/cgi-bin/koha/sco/sco-main.pl?op=logout';
387 [% IF Koha.Preference('AudioAlerts') %]
388 var AUDIO_ALERTS = JSON.parse( "[% To.json(AudioAlerts.AudioAlerts) | $raw %]" );
389 $( document ).ready(function() {
390 if ( AUDIO_ALERTS ) {
391 for ( var k in AUDIO_ALERTS ) {
392 var alert = AUDIO_ALERTS[k];
393 if ( $( alert.selector ).length ) {
394 playSound( alert.sound );
400 function playSound( sound ) {
401 if ( ( sound.indexOf('http://') == 0 || sound.indexOf('https://') == 0 ) ) {
402 document.getElementById("audio-alert").innerHTML = '<audio src="' + sound + '" autoplay="autoplay" autobuffer="autobuffer"></audio>';
408 $(document).ready(function() {
410 [% IF ( patronid ) %]sco_init();[% END %]
411 $("#loanTable").dataTable($.extend(true, {}, dataTablesDefaults, {
414 { "targets": [ "nosort" ], "sortable": false, "searchable": false },
415 { "targets": [ "noshow" ], "visible": false, "searchable": false },
416 { "type": "anti-the", "targets" : [ "anti-the" ] },
417 { "type": "title-string", "targets" : [ "title-string" ] }
421 $("#logout_form").submit(function(){
422 clearTimeout(mainTimeout);
423 [% IF Koha.Preference('SelfCheckReceiptPrompt') %]
424 var confirmStart = Date.now();
425 if(confirm(_("Would you like to print a receipt?"))){
426 if ( (Date.now() - confirmStart) < [% SelfCheckTimeout | html %] ) {
427 window.open("/cgi-bin/koha/sco/printslip.pl?borrowernumber=[% borrowernumber | html %]&print=qslip");
429 alert(_("Timeout while waiting for print confirmation"));
440 [% IF ( Koha.Preference('SCOUserJS') ) %]<script>[% Koha.Preference('SCOUserJS') | $raw %]</script>[% END %]