6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha [% END %] › Self checkout </title>
8 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
9 <meta name="generator" content="Koha [% Version %]" /> <!-- leave this for stats -->
10 <link rel="shortcut icon" href="[% IF ( Koha.Preference('OpacFavicon') ) %][% Koha.Preference('OpacFavicon') %][% ELSE %][% interface %]/[% theme %]/images/favicon.ico[% END %]" type="image/x-icon" />
11 [% Asset.css("lib/bootstrap/css/bootstrap.min.css") %]
12 [% Asset.css("lib/jquery/jquery-ui.css") %]
13 [% Asset.css("css/sco.css") %]
14 [% IF ( Koha.Preference('OPACUserCSS') ) %]<style>[% Koha.Preference('OPACUserCSS') %]</style>[% END %]
15 [% IF ( Koha.Preference('SCOUserCSS') ) %]<style>[% Koha.Preference('SCOUserCSS') %]</style>[% END %]
17 <script src="[% interface %]/[% theme %]/lib/respond.min.js"></script>
20 function _(s) { return s } // dummy function for gettext
22 [% Asset.js("lib/modernizr.min.js") %]
24 <body id="sco_main" class="sco" onload="dofocus();" onunload="mungeHistory();">
25 [% INCLUDE 'masthead-sco.inc' %]
28 <div class="container-fluid">
29 <div class="row-fluid">
30 [% IF ( display_patron_image ) %]
36 <div id="masthead"><h1>[% LibraryName %] Self checkout system</h1></div>
38 [% IF ( impossible ) %]<!-- We tried to issue, but failed. -->
40 <h3>Item cannot be checked out.</h3>
41 <p>Sorry, this item cannot be checked out at this station.</p>
43 <p>Title: <em>[% title |html %]</em> </p>
47 [% IF ( circ_error_UNKNOWN_BARCODE ) %]
48 The system does not recognize this barcode.
49 [% ELSIF ( circ_error_max_loans_allowed ) %]
50 You have checked out too many items and can't check out any more.
51 [% ELSIF ( circ_error_ISSUED_TO_ANOTHER ) %]
52 This item is checked out to someone else.
53 [% ELSIF ( circ_error_NO_MORE_RENEWALS ) %]
54 You cannot renew this item again.
55 [% ELSIF ( circ_error_NOT_FOR_LOAN ) %]
56 This item is not for loan.
57 [% ELSIF ( circ_error_DEBT ) %]
58 You owe the library [% DEBT | $Price %] and cannot check out.
59 [% ELSIF ( circ_error_WTHDRAWN ) %]
60 This item has been withdrawn from the collection.
61 [% ELSIF ( circ_error_RESTRICTED ) %]
62 This item is restricted.
63 [% ELSIF ( circ_error_RESERVED ) %]
64 This item is on hold for another patron.
65 [% ELSIF ( circ_error_ITEMNOTSAMEBRANCH ) %]
66 This item belongs to another branch.
67 [% ELSIF ( circ_error_EXPIRED ) %]
68 Your account has expired.
69 [% ELSIF ( circ_error_DEBARRED ) %]
70 Your account has been suspended.
71 [% ELSIF ( circ_error_CARD_LOST ) %]
72 This card has been declared lost.
73 [% ELSIF ( circ_error_GNA ) %]
74 Your contact information seems to be incomplete.
75 [% ELSIF ( circ_error_INVALID_DATE ) %]
76 Due date is not valid.
78 Please see a member of the library staff.
81 [% IF ( returnitem && Koha.Preference('AllowSelfCheckReturns') ) %]
82 <form action="/cgi-bin/koha/sco/sco-main.pl" name="errorForm" class="inline" method="post">
83 <input type="hidden" name="op" value="returnbook" />
84 <input type="hidden" name="patronid" value="[% patronid %]" />
85 <input type="hidden" name="barcode" value="[% barcode %]" />
86 <button type="submit" name="returnbook" class="btn"><i class="return"></i> Return this item</button>
90 <form action="/cgi-bin/koha/sco/sco-main.pl" name="errorForm" class="inline" method="post">
91 <input type="hidden" name="op" value="" />
92 <input type="hidden" name="patronid" value="[% patronid %]" />
93 <input type="hidden" name="barcode" value="[% barcode %]" />
94 <input type="submit" name= "confirm" value="Return to account summary" class="btn back focus" />
96 </div> <!-- / .alert -->
97 [% END # / IF ( impossible %]
99 [% IF ( confirm ) %]<!-- We need to confirm the issue.. -->
100 <div class="alert"><h3>Please confirm the checkout:</h3>
101 [% IF ( confirm_renew_issue ) %]
102 <p>This item is already checked out to you.</p>
105 [% IF ( renew && Koha.Preference('AllowSelfCheckReturns') ) %]
106 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
107 <input type="hidden" name="op" value="returnbook" />
108 <input type="hidden" name="patronid" value="[% patronid %]" />
109 <input type="hidden" name="barcode" value="[% barcode %]" />
110 <input type="hidden" name="confirmed" value="" />
111 <button type="submit" name="returnbook" class="btn"><i class="icon return"></i> Return this item</button>
115 [% UNLESS ( renew ) %]
116 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
117 <input type="hidden" name="op" value="checkout" />
118 <input type="hidden" name="patronid" value="[% patronid %]" />
119 <input type="hidden" name="barcode" value="[% barcode %]" />
120 <input type="hidden" name="confirmed" value="1" />
121 <button type="submit" name="confirm" class="btn"><i class="icon renew"></i> Renew item</button>
124 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
125 <input type="hidden" name="op" value="checkout" />
126 <input type="hidden" name="patronid" value="[% patronid %]" />
127 <input type="hidden" name="barcode" value="[% barcode %]" />
128 <input type="hidden" name="confirmed" value="1" />
129 <button type="submit" class="btn"><i class="icon renew"></i> Renew item</button>
133 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
134 <input type="hidden" name="op" value="" />
135 <input type="hidden" name="patronid" value="[% patronid %]" />
136 <button type="submit" class="btn"><i class="icon cancel"></i> Cancel</button>
139 [% END # / IF confirm %]
141 [% IF ( nopermission ) %]
142 <!-- This is what is displayed if user doesnt have permission -->
144 <h3>Access denied</h3>
145 <p>Sorry, this self-checkout station has lost authentication. Please contact the administrator to resolve this problem.</p>
149 [% IF ( different_ip ) %]
150 <!-- This is what is displayed if user doesnt have permission -->
152 <h3>Session lost</h3>
153 <p>You are accessing self-checkout from a different IP address! please log in again.</p>
157 [% IF ( invalid_username_or_password ) %]
158 <!-- This is what is displayed if user doesnt have permission -->
160 <h3>Record not found</h3>
161 <p>Your userid was not found in the database. Please try again.</p>
166 [% UNLESS ( hide_main ) %]
168 [% IF ( patronid ) %]
169 [% IF ( validuser ) %]
170 <div class="alert alert-info">You are logged in as [% borrowername %].</div>
171 [% INCLUDE 'opac-note.inc' %]
172 [% IF patron_has_hold_fee %]
173 <div class="alert">A hold fee was charged to your account for collecting this item.</div>
180 <p>The userid <strong>[% patronid %]</strong> was not found in the database. Please try again.</p>
183 [% END # / IF patronid %]
185 [% IF ( validuser ) %]
186 <div id="newcheckout" class="sco_entry">
187 <form id="scan_form" name="scan_form" method="post" action="/cgi-bin/koha/sco/sco-main.pl" onsubmit="return checkout_confirm('[% patronid %]');">
189 <legend>Check out[% IF ( Koha.Preference('AllowSelfCheckReturns') ) %], return[% END %] or renew an item: </legend>
190 <div class="input-append">
191 <label for="barcode">Scan a new item or enter its barcode:</label>
192 <input id="barcode" name="barcode" size="20" type="text" class="focus" autocomplete="off" />
193 <button type="submit" class="btn">Submit</button>
195 <input type="hidden" name="op" value="checkout" />
196 <input type="hidden" name="patronid" value="[% patronid %]" />
201 <form method="post" action="#" id="logout_form">
202 <button type="submit" class="btn"><i class="icon finish"></i> Finish</button>
205 </div> <!-- / #newcheckout -->
206 </div> <!-- / .span12/12 -->
207 [% IF ( display_patron_image ) %]
209 <img src="/cgi-bin/koha/sco/sco-patron-image.pl?borrowernumber=[% borrowernumber %]&csrf_token=[% csrf_token %]" alt="" />
212 </div> <!-- / .row-fluid -->
213 </div> <!-- / .container-fluid -->
215 <div class="container-fluid">
216 <div class="row-fluid">
218 <div id="borrowerdetails">
219 [% IF ( issues_count ) %]
220 <table id="loanTable" class="table table-bordered table-striped">
221 <caption>Checkouts for [% borrowername %] <span class="count">([% issues_count %] total)</span></caption>
222 <!-- ISSUES TABLE ROWS -->
225 <th class="noshow">Checked out on</th>
226 <th class="anti-the">Title</th>
228 <th class="title-string">Due</th>
229 <th class="nosort">Renew</th>
230 [% UNLESS ( nofines ) %]
236 [% FOREACH ISSUE IN ISSUES %]
238 <td>[% ISSUE.issuedate %]</td>
240 [% UNLESS ( noitemlinks ) %]
241 <a href="/cgi-bin/koha/opac-detail.pl?bib=[% ISSUE. biblionumber %]">[% ISSUE.title |html %]</a>
243 <strong>[% ISSUE.title |html %]</strong>
245 <span class="item-details">[% ISSUE.author %]</span>
246 ([% ISSUE.barcode %])
248 <td>[% ISSUE.itemcallnumber %]</td>
249 [% IF ( ISSUE.overdue ) %]
250 <td class="overdue"><span title="[% ISSUE.date_due %]">[% ISSUE.date_due | $KohaDates as_due_date => 1 %]</span></td>
252 <td><span title="[% ISSUE.date_due %]">[% ISSUE.date_due | $KohaDates as_due_date => 1 %]</span></td>
255 <form action="/cgi-bin/koha/sco/sco-main.pl" method="post">
256 <input type="hidden" name="patronid" value="[% patronid %]" />
257 <input type="hidden" name="barcode" value="[% ISSUE.barcode %]" />
258 [% IF ISSUE.can_be_renewed %]
259 <input type="hidden" name="op" value="checkout" />
260 <input type="hidden" name="confirmed" value="1" />
261 [% UNLESS ( ISSUE.renew ) %]
262 <input type="submit" value="Renew item" name="confirm " class="btn renew" />
264 <input type="submit" value="Renew item" class="btn renew" />
267 [% IF ISSUE.renew_error == 'auto_renew' OR ISSUE.renew_error == 'auto_too_soon' %]
268 <span>This item has been scheduled for automatic renewal and cannot be renewed</span>
269 [% ELSIF ISSUE.renew_error == 'onsite_checkout' %]
270 <span>This is a on-site checkout, it cannot be renewed.</span>
272 <span>No renewals allowed</span>
274 [% IF Koha.Preference('AllowSelfCheckReturns') %]
275 <input type="submit" value="Check in item" name="confirm" class="btn return" />
276 <input type="hidden" name="op" value="returnbook" />
277 <input type="hidden" name="confirmed" value="" />
282 [% UNLESS ( nofines ) %]
284 [% IF ( ISSUE.charges ) %]Yes[% ELSE %]No[% END %]
288 [% END # / FOREACH ISSUE %]
292 <h3>You currently have nothing checked out.</h3>
293 [% END # / IF issues_count %]
294 </div> <!-- / #borrowerdetails -->
295 [% ELSE # IF validuser %]
296 <div class="sco_entry" >
297 <form id="mainform" action="/cgi-bin/koha/sco/sco-main.pl" name="mainform" method="post">
298 <fieldset class="checkout brief">
299 [% IF ( Koha.Preference('SelfCheckoutByLogin') ) %]
300 <legend>Log in to your account</legend>
301 <label for="patronlogin">Login:</label>
302 <input type="text" id="patronlogin" class="focus" size="20" name="patronlogin" />
303 <label for="patronpw">Password:</label>
304 <input type="password" id="patronpw" size="20" name="patronpw" />
305 <fieldset class="action">
306 <button type="submit" class="btn">Log in</button>
309 <div class="input-append">
310 <label for="patronid">Please enter your card number:</label>
311 <input type="text" id="patronid" class="focus" size="20" name="patronid" autocomplete="off" />
312 <button type="submit" class="btn">Submit</button>
316 [% FOREACH INPUT IN INPUTS %]
317 <input type="hidden" name="[% INPUT.name |html %]" value="[% INPUT.value |html %]">
319 <input type="hidden" name="op" value="login" />
322 </div> <!-- / .sco_entry -->
323 [% END # / IF validuser %]
324 [% END # / UNLESS ( hide_main %]
325 [% IF ( Koha.Preference('SCOMainUserBlock' ) ) %]<div id="scomainuserblock">[% Koha.Preference('SCOMainUserBlock' ) %]</div>[% END %]
326 </div> <!-- / .span12 -->
327 </div> <!-- / .row-fluid -->
328 </div> <!-- / .container-fluid -->
329 </div> <!-- / .main -->
330 <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 %]);
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( '"', '\\"' ) %]' );
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 %] ) {
410 window.open("/cgi-bin/koha/sco/printslip.pl?borrowernumber=[% borrowernumber %]&print=qslip");
412 alert(_("Timeout while waiting for print confirmation"));
423 [% IF ( Koha.Preference('SCOUserJS') ) %]<script>[% Koha.Preference('SCOUserJS') %]</script>[% END %]