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') | html %][% 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 <button type="submit" name="returnbook" class="btn"><i class="return"></i> Return this item</button>
91 <form action="/cgi-bin/koha/sco/sco-main.pl" name="errorForm" class="inline" method="post">
92 <input type="hidden" name="op" value="" />
93 <input type="hidden" name="patronid" value="[% patronid | html %]" />
94 <input type="hidden" name="barcode" value="[% barcode | html %]" />
95 <input type="submit" name= "confirm" value="Return to account summary" class="btn back focus" />
97 </div> <!-- / .alert -->
98 [% END # / IF ( impossible %]
100 [% IF ( confirm ) %]<!-- We need to confirm the issue.. -->
101 <div class="alert"><h3>Please confirm the checkout:</h3>
102 [% IF ( confirm_renew_issue ) %]
103 <p>This item is already checked out to you.</p>
106 [% IF ( renew && Koha.Preference('AllowSelfCheckReturns') ) %]
107 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
108 <input type="hidden" name="op" value="returnbook" />
109 <input type="hidden" name="patronid" value="[% patronid | html %]" />
110 <input type="hidden" name="barcode" value="[% barcode | html %]" />
111 <input type="hidden" name="confirmed" value="" />
112 <button type="submit" name="returnbook" class="btn"><i class="icon return"></i> Return this item</button>
116 [% UNLESS ( renew ) %]
117 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
118 <input type="hidden" name="op" value="checkout" />
119 <input type="hidden" name="patronid" value="[% patronid | html %]" />
120 <input type="hidden" name="barcode" value="[% barcode | html %]" />
121 <input type="hidden" name="confirmed" value="1" />
122 <button type="submit" name="confirm" class="btn"><i class="icon renew"></i> Renew item</button>
125 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
126 <input type="hidden" name="op" value="checkout" />
127 <input type="hidden" name="patronid" value="[% patronid | html %]" />
128 <input type="hidden" name="barcode" value="[% barcode | html %]" />
129 <input type="hidden" name="confirmed" value="1" />
130 <button type="submit" class="btn"><i class="icon renew"></i> Renew item</button>
134 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
135 <input type="hidden" name="op" value="" />
136 <input type="hidden" name="patronid" value="[% patronid | html %]" />
137 <button type="submit" class="btn"><i class="icon cancel"></i> Cancel</button>
140 [% END # / IF confirm %]
142 [% IF ( nopermission ) %]
143 <!-- This is what is displayed if user doesnt have permission -->
145 <h3>Access denied</h3>
146 <p>Sorry, this self-checkout station has lost authentication. Please contact the administrator to resolve this problem.</p>
150 [% IF ( different_ip ) %]
151 <!-- This is what is displayed if user doesnt have permission -->
153 <h3>Session lost</h3>
154 <p>You are accessing self-checkout from a different IP address! please log in again.</p>
158 [% IF ( invalid_username_or_password ) %]
159 <!-- This is what is displayed if user doesnt have permission -->
161 <h3>Record not found</h3>
162 <p>Your userid was not found in the database. Please try again.</p>
167 [% UNLESS ( hide_main ) %]
169 [% IF ( patronid ) %]
170 [% IF ( validuser ) %]
171 <div class="alert alert-info">You are logged in as [% borrowername | html %].</div>
172 [% INCLUDE 'opac-note.inc' %]
173 [% IF patron_has_hold_fee %]
174 <div class="alert">A hold fee was charged to your account for collecting this item.</div>
181 <p>The userid <strong>[% patronid | html %]</strong> was not found in the database. Please try again.</p>
184 [% END # / IF patronid %]
186 [% IF ( validuser ) %]
187 <div id="newcheckout" class="sco_entry">
188 <form id="scan_form" name="scan_form" method="post" action="/cgi-bin/koha/sco/sco-main.pl" onsubmit="return checkout_confirm('[% patronid | html %]');">
190 <legend>Check out[% IF ( Koha.Preference('AllowSelfCheckReturns') ) %], return[% END %] or renew an item: </legend>
191 <div class="input-append">
192 <label for="barcode">Scan a new item or enter its barcode:</label>
193 <input id="barcode" name="barcode" size="20" type="text" class="focus" autocomplete="off" />
194 <button type="submit" class="btn">Submit</button>
196 <input type="hidden" name="op" value="checkout" />
197 <input type="hidden" name="patronid" value="[% patronid | html %]" />
202 <form method="post" action="#" id="logout_form">
203 <button type="submit" class="btn"><i class="icon finish"></i> Finish</button>
206 </div> <!-- / #newcheckout -->
207 </div> <!-- / .span12/12 -->
208 [% IF ( display_patron_image ) %]
210 <img src="/cgi-bin/koha/sco/sco-patron-image.pl?borrowernumber=[% borrowernumber | html %]&csrf_token=[% csrf_token | html %]" alt="" />
213 </div> <!-- / .row-fluid -->
214 </div> <!-- / .container-fluid -->
216 <div class="container-fluid">
217 <div class="row-fluid">
219 <div id="borrowerdetails">
220 [% IF ( issues_count ) %]
221 <table id="loanTable" class="table table-bordered table-striped">
222 <caption>Checkouts for [% borrowername | html %] <span class="count">([% issues_count | html %] total)</span></caption>
223 <!-- ISSUES TABLE ROWS -->
226 <th class="noshow">Checked out on</th>
227 <th class="anti-the">Title</th>
229 <th class="title-string">Due</th>
230 <th class="nosort">Renew</th>
231 [% UNLESS ( nofines ) %]
237 [% FOREACH ISSUE IN ISSUES %]
239 <td>[% ISSUE.issuedate | html %]</td>
241 [% UNLESS ( noitemlinks ) %]
242 <a href="/cgi-bin/koha/opac-detail.pl?bib=[% ISSUE. biblionumber | uri %]">[% ISSUE.title | html %]</a>
244 <strong>[% ISSUE.title | html %]</strong>
246 <span class="item-details">[% ISSUE.author | html %]</span>
247 ([% ISSUE.barcode | html %])
249 <td>[% ISSUE.itemcallnumber | html %]</td>
250 [% IF ( ISSUE.overdue ) %]
251 <td class="overdue"><span title="[% ISSUE.date_due | html %]">[% ISSUE.date_due | $KohaDates as_due_date => 1 | html %]</span></td>
253 <td><span title="[% ISSUE.date_due | html %]">[% ISSUE.date_due | $KohaDates as_due_date => 1 | html %]</span></td>
256 <form action="/cgi-bin/koha/sco/sco-main.pl" method="post">
257 <input type="hidden" name="patronid" value="[% patronid | html %]" />
258 <input type="hidden" name="barcode" value="[% ISSUE.barcode | html %]" />
259 [% IF ISSUE.can_be_renewed %]
260 <input type="hidden" name="op" value="checkout" />
261 <input type="hidden" name="confirmed" value="1" />
262 [% UNLESS ( ISSUE.renew ) %]
263 <input type="submit" value="Renew item" name="confirm " class="btn renew" />
265 <input type="submit" value="Renew item" class="btn renew" />
268 [% IF ISSUE.renew_error == 'auto_renew' OR ISSUE.renew_error == 'auto_too_soon' %]
269 <span>This item has been scheduled for automatic renewal and cannot be renewed</span>
270 [% ELSIF ISSUE.renew_error == 'onsite_checkout' %]
271 <span>This is a on-site checkout, it cannot be renewed.</span>
273 <span>No renewals allowed</span>
275 [% IF Koha.Preference('AllowSelfCheckReturns') %]
276 <input type="submit" value="Check in item" name="confirm" class="btn return" />
277 <input type="hidden" name="op" value="returnbook" />
278 <input type="hidden" name="confirmed" value="" />
283 [% UNLESS ( nofines ) %]
285 [% IF ( ISSUE.charges ) %]Yes[% ELSE %]No[% END %]
289 [% END # / FOREACH ISSUE %]
293 <h3>You currently have nothing checked out.</h3>
294 [% END # / IF issues_count %]
295 </div> <!-- / #borrowerdetails -->
296 [% ELSE # IF validuser %]
297 <div class="sco_entry" >
298 <form id="mainform" action="/cgi-bin/koha/sco/sco-main.pl" name="mainform" method="post">
299 <fieldset class="checkout brief">
300 [% IF ( Koha.Preference('SelfCheckoutByLogin') ) %]
301 <legend>Log in to your account</legend>
302 <label for="patronlogin">Login:</label>
303 <input type="text" id="patronlogin" class="focus" size="20" name="patronlogin" />
304 <label for="patronpw">Password:</label>
305 <input type="password" id="patronpw" size="20" name="patronpw" />
306 <fieldset class="action">
307 <button type="submit" class="btn">Log in</button>
310 <div class="input-append">
311 <label for="patronid">Please enter your card number:</label>
312 <input type="text" id="patronid" class="focus" size="20" name="patronid" autocomplete="off" />
313 <button type="submit" class="btn">Submit</button>
317 [% FOREACH INPUT IN INPUTS %]
318 <input type="hidden" name="[% INPUT.name | html %]" value="[% INPUT.value | html %]">
320 <input type="hidden" name="op" value="login" />
323 </div> <!-- / .sco_entry -->
324 [% END # / IF validuser %]
325 [% END # / UNLESS ( hide_main %]
326 [% IF ( Koha.Preference('SCOMainUserBlock' ) ) %]<div id="scomainuserblock">[% Koha.Preference('SCOMainUserBlock' ) | $raw %]</div>[% END %]
327 </div> <!-- / .span12 -->
328 </div> <!-- / .row-fluid -->
329 </div> <!-- / .container-fluid -->
330 </div> <!-- / .main -->
331 <span id="audio-alert"></span>
333 [% INCLUDE 'opac-bottom.inc' %]
334 [% BLOCK jsinclude %]
335 [% INCLUDE 'datatables.inc' %]
338 function mungeHistory() {
339 // prevent back button from allowing form resubmission
340 if (history && history.pushState) {
341 history.replaceState(null, document.title, window.location.href);
345 function sco_init() {
346 mainTimeout = setTimeout(function() {
347 location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout';
348 }, [% SelfCheckTimeout | html %]);
350 function dofocus() { // named function req'd for body onload event by some FF and IE7 security models
351 // alert("dofocus called");
352 $(".focus:last").select();
354 var slip_re = /slip/;
355 function printx_window(print_type) {
356 var handler = print_type.match(slip_re) ? "printslip" : "moremember";
360 function checkout_confirm(patronid) {
361 var barcode = $("#barcode").val();
362 // alert("checkout_confirm('" + patronid + "') called for barcode '" + barcode + "'");
363 if (! barcode) { dofocus(); return false; } // no barcode
364 if (barcode == "__KOHA_NEW_CIRC__") { // magic barcode
365 window.location.href='/cgi-bin/koha/sco/sco-main.pl?op=logout';
370 [% IF Koha.Preference('AudioAlerts') %]
371 var AUDIO_ALERTS = JSON.parse( '[% AudioAlerts.AudioAlerts | replace( "'", "\\'" ) | replace( '"', '\\"' ) | html %]' );
372 $( document ).ready(function() {
373 if ( AUDIO_ALERTS ) {
374 for ( var k in AUDIO_ALERTS ) {
375 var alert = AUDIO_ALERTS[k];
376 if ( $( alert.selector ).length ) {
377 playSound( alert.sound );
383 function playSound( sound ) {
384 if ( ( sound.indexOf('http://') == 0 || sound.indexOf('https://') == 0 ) ) {
385 document.getElementById("audio-alert").innerHTML = '<audio src="' + sound + '" autoplay="autoplay" autobuffer="autobuffer"></audio>';
391 $(document).ready(function() {
393 [% IF ( patronid ) %]sco_init();[% END %]
394 $("#loanTable").dataTable($.extend(true, {}, dataTablesDefaults, {
397 { "targets": [ "nosort" ], "sortable": false, "searchable": false },
398 { "targets": [ "noshow" ], "visible": false, "searchable": false },
399 { "type": "anti-the", "targets" : [ "anti-the" ] },
400 { "type": "title-string", "targets" : [ "title-string" ] }
404 $("#logout_form").submit(function(){
405 clearTimeout(mainTimeout);
406 [% IF Koha.Preference('SelfCheckReceiptPrompt') %]
407 var confirmStart = Date.now();
408 if(confirm(_("Would you like to print a receipt?"))){
409 if ( (Date.now() - confirmStart) < [% SelfCheckTimeout | html %] ) {
410 window.open("/cgi-bin/koha/sco/printslip.pl?borrowernumber=[% borrowernumber | html %]&print=qslip");
412 alert(_("Timeout while waiting for print confirmation"));
423 [% IF ( Koha.Preference('SCOUserJS') ) %]<script>[% Koha.Preference('SCOUserJS') | $raw %]</script>[% END %]