5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha [% END %] › Self checkout </title>
7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8 <meta name="generator" content="Koha [% Version %]" /> <!-- leave this for stats -->
9 <link rel="shortcut icon" href="[% IF ( Koha.Preference('OpacFavicon') ) %][% Koha.Preference('OpacFavicon') %][% ELSE %][% interface %]/[% theme %]/images/favicon.ico[% END %]" type="image/x-icon" />
10 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/lib/bootstrap/css/bootstrap.min_[% KOHA_VERSION %].css" />
11 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/lib/jquery/jquery-ui_[% KOHA_VERSION %].css" />
12 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/sco_[% KOHA_VERSION %].css" />
13 [% IF ( Koha.Preference('OPACUserCSS') ) %]<style>[% Koha.Preference('OPACUserCSS') %]</style>[% END %]
14 [% IF ( Koha.Preference('SCOUserCSS') ) %]<style>[% Koha.Preference('SCOUserCSS') %]</style>[% END %]
16 <script src="[% interface %]/[% theme %]/lib/respond.min.js"></script>
18 <script type="text/javascript">
19 function _(s) { return s } // dummy function for gettext
21 <script type="text/javascript" src="[% interface %]/[% theme %]/lib/modernizr.min_[% KOHA_VERSION %].js"></script>
23 <body id="sco_main" class="sco" onload="dofocus();" onunload="mungeHistory();">
24 [% INCLUDE 'masthead-sco.inc' %]
27 <div class="container-fluid">
28 <div class="row-fluid">
29 [% IF ( display_patron_image ) %]
35 <div id="masthead"><h1>[% LibraryName %] Self checkout system</h1></div>
37 [% IF ( impossible ) %]<!-- We tried to issue, but failed. -->
39 <h3>Item cannot be checked out.</h3>
40 <p>Sorry, this item cannot be checked out at this station.</p>
42 <p>Title: <em>[% title |html %]</em> </p>
46 [% IF ( circ_error_UNKNOWN_BARCODE ) %]
47 The system does not recognize this barcode.
48 [% ELSIF ( circ_error_max_loans_allowed ) %]
49 You have checked out too many items and can't check out any more.
50 [% ELSIF ( circ_error_ISSUED_TO_ANOTHER ) %]
51 This item is checked out to someone else.
52 [% ELSIF ( circ_error_NO_MORE_RENEWALS ) %]
53 You cannot renew this item again.
54 [% ELSIF ( circ_error_NOT_FOR_LOAN ) %]
55 This item is not for loan.
56 [% ELSIF ( circ_error_DEBT ) %]
57 You owe the library [% DEBT | $Price %] and cannot check out.
58 [% ELSIF ( circ_error_WTHDRAWN ) %]
59 This item has been withdrawn from the collection.
60 [% ELSIF ( circ_error_RESTRICTED ) %]
61 This item is restricted.
62 [% ELSIF ( circ_error_RESERVED ) %]
63 This item is on hold for another patron.
64 [% ELSIF ( circ_error_ITEMNOTSAMEBRANCH ) %]
65 This item belongs to another branch.
66 [% ELSIF ( circ_error_EXPIRED ) %]
67 Your account has expired.
68 [% ELSIF ( circ_error_DEBARRED ) %]
69 Your account has been suspended.
70 [% ELSIF ( circ_error_CARD_LOST ) %]
71 This card has been declared lost.
72 [% ELSIF ( circ_error_GNA ) %]
73 Your contact information seems to be incomplete.
74 [% ELSIF ( circ_error_INVALID_DATE ) %]
75 Due date is not valid.
77 Please see a member of the library staff.
80 [% IF ( returnitem && Koha.Preference('AllowSelfCheckReturns') ) %]
81 <form action="/cgi-bin/koha/sco/sco-main.pl" name="errorForm" class="inline" method="post">
82 <input type="hidden" name="op" value="returnbook" />
83 <input type="hidden" name="patronid" value="[% patronid %]" />
84 <input type="hidden" name="barcode" value="[% barcode %]" />
85 <button type="submit" name="returnbook" class="btn"><i class="return"></i> Return this item</button>
89 <form action="/cgi-bin/koha/sco/sco-main.pl" name="errorForm" class="inline" method="post">
90 <input type="hidden" name="op" value="" />
91 <input type="hidden" name="patronid" value="[% patronid %]" />
92 <input type="hidden" name="barcode" value="[% barcode %]" />
93 <input type="submit" name= "confirm" value="Return to account summary" class="btn back focus" />
95 </div> <!-- / .alert -->
96 [% END # / IF ( impossible %]
98 [% IF ( confirm ) %]<!-- We need to confirm the issue.. -->
99 <div class="alert"><h3>Please confirm the checkout:</h3>
100 [% IF ( confirm_renew_issue ) %]
101 <p>This item is already checked out to you.</p>
104 [% IF ( renew && Koha.Preference('AllowSelfCheckReturns') ) %]
105 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
106 <input type="hidden" name="op" value="returnbook" />
107 <input type="hidden" name="patronid" value="[% patronid %]" />
108 <input type="hidden" name="barcode" value="[% barcode %]" />
109 <input type="hidden" name="confirmed" value="" />
110 <button type="submit" name="returnbook" class="btn"><i class="icon return"></i> Return this item</button>
114 [% UNLESS ( renew ) %]
115 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
116 <input type="hidden" name="op" value="checkout" />
117 <input type="hidden" name="patronid" value="[% patronid %]" />
118 <input type="hidden" name="barcode" value="[% barcode %]" />
119 <input type="hidden" name="confirmed" value="1" />
120 <button type="submit" name="confirm" class="btn"><i class="icon renew"></i> Renew item</button>
123 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
124 <input type="hidden" name="op" value="checkout" />
125 <input type="hidden" name="patronid" value="[% patronid %]" />
126 <input type="hidden" name="barcode" value="[% barcode %]" />
127 <input type="hidden" name="confirmed" value="1" />
128 <button type="submit" class="btn"><i class="icon renew"></i> Renew item</button>
132 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
133 <input type="hidden" name="op" value="" />
134 <input type="hidden" name="patronid" value="[% patronid %]" />
135 <button type="submit" class="btn"><i class="icon cancel"></i> Cancel</button>
138 [% END # / IF confirm %]
140 [% IF ( nopermission ) %]
141 <!-- This is what is displayed if user doesnt have permission -->
143 <h3>Access denied</h3>
144 <p>Sorry, this self-checkout station has lost authentication. Please contact the administrator to resolve this problem.</p>
148 [% IF ( different_ip ) %]
149 <!-- This is what is displayed if user doesnt have permission -->
151 <h3>Session lost</h3>
152 <p>You are accessing self-checkout from a different IP address! please log in again.</p>
156 [% IF ( invalid_username_or_password ) %]
157 <!-- This is what is displayed if user doesnt have permission -->
159 <h3>Record not found</h3>
160 <p>Your userid was not found in the database. Please try again.</p>
165 [% UNLESS ( hide_main ) %]
167 [% IF ( patronid ) %]
168 [% IF ( validuser ) %]
169 <div class="alert alert-info">You are logged in as [% borrowername %].</div>
170 [% INCLUDE 'opac-note.inc' %]
171 [% IF patron_has_hold_fee %]
172 <div class="alert">A hold fee was charged to your account for collecting this item.</div>
179 <p>The userid <strong>[% patronid %]</strong> was not found in the database. Please try again.</p>
182 [% END # / IF patronid %]
184 [% IF ( validuser ) %]
185 <div id="newcheckout" class="sco_entry">
186 <form id="scan_form" name="scan_form" method="post" action="/cgi-bin/koha/sco/sco-main.pl" onsubmit="return checkout_confirm('[% patronid %]');">
188 <legend>Check out[% IF ( Koha.Preference('AllowSelfCheckReturns') ) %], return[% END %] or renew an item: </legend>
189 <div class="input-append">
190 <label for="barcode">Scan a new item or enter its barcode:</label>
191 <input id="barcode" name="barcode" size="20" type="text" class="focus" autocomplete="off" />
192 <button type="submit" class="btn">Submit</button>
194 <input type="hidden" name="op" value="checkout" />
195 <input type="hidden" name="patronid" value="[% patronid %]" />
200 <form method="post" action="#" id="logout_form">
201 <button type="submit" class="btn"><i class="icon finish"></i> Finish</button>
204 </div> <!-- / #newcheckout -->
205 </div> <!-- / .span12/12 -->
206 [% IF ( display_patron_image ) %]
208 <img src="/cgi-bin/koha/sco/sco-patron-image.pl?borrowernumber=[% borrowernumber %]&csrf_token=[% csrf_token %]" alt="" />
211 </div> <!-- / .row-fluid -->
212 </div> <!-- / .container-fluid -->
214 <div class="container-fluid">
215 <div class="row-fluid">
217 <div id="borrowerdetails">
218 [% IF ( issues_count ) %]
219 <table id="loanTable" class="table table-bordered table-striped">
220 <caption>Checkouts for [% borrowername %] <span class="count">([% issues_count %] total)</span></caption>
221 <!-- ISSUES TABLE ROWS -->
224 <th class="noshow">Checked out on</th>
225 <th class="anti-the">Title</th>
227 <th class="title-string">Due</th>
228 <th class="nosort">Renew</th>
229 [% UNLESS ( nofines ) %]
235 [% FOREACH ISSUE IN ISSUES %]
237 <td>[% ISSUE.issuedate %]</td>
239 [% UNLESS ( noitemlinks ) %]
240 <a href="/cgi-bin/koha/opac-detail.pl?bib=[% ISSUE. biblionumber %]">[% ISSUE.title |html %]</a>
242 <strong>[% ISSUE.title |html %]</strong>
244 <span class="item-details">[% ISSUE.author %]</span>
245 ([% ISSUE.barcode %])
247 <td>[% ISSUE.itemcallnumber %]</td>
248 [% IF ( ISSUE.overdue ) %]
249 <td class="overdue"><span title="[% ISSUE.date_due %]">[% ISSUE.date_due | $KohaDates as_due_date => 1 %]</span></td>
251 <td><span title="[% ISSUE.date_due %]">[% ISSUE.date_due | $KohaDates as_due_date => 1 %]</span></td>
254 <form action="/cgi-bin/koha/sco/sco-main.pl" method="post">
255 <input type="hidden" name="patronid" value="[% patronid %]" />
256 <input type="hidden" name="barcode" value="[% ISSUE.barcode %]" />
257 [% IF ISSUE.can_be_renewed %]
258 <input type="hidden" name="op" value="checkout" />
259 <input type="hidden" name="confirmed" value="1" />
260 [% UNLESS ( ISSUE.renew ) %]
261 <input type="submit" value="Renew item" name="confirm " class="btn renew" />
263 <input type="submit" value="Renew item" class="btn renew" />
266 [% IF ISSUE.renew_error == 'auto_renew' OR ISSUE.renew_error == 'auto_too_soon' %]
267 <span>This item has been scheduled for automatic renewal and cannot be renewed</span>
268 [% ELSIF ISSUE.renew_error == 'onsite_checkout' %]
269 <span>This is a on-site checkout, it cannot be renewed.</span>
271 <span>No renewals allowed</span>
273 [% IF Koha.Preference('AllowSelfCheckReturns') %]
274 <input type="submit" value="Check in item" name="confirm" class="btn return" />
275 <input type="hidden" name="op" value="returnbook" />
276 <input type="hidden" name="confirmed" value="" />
281 [% UNLESS ( nofines ) %]
283 [% IF ( ISSUE.charges ) %]Yes[% ELSE %]No[% END %]
287 [% END # / FOREACH ISSUE %]
291 <h3>You currently have nothing checked out.</h3>
292 [% END # / IF issues_count %]
293 </div> <!-- / #borrowerdetails -->
294 [% ELSE # IF validuser %]
295 <div class="sco_entry" >
296 <form id="mainform" action="/cgi-bin/koha/sco/sco-main.pl" name="mainform" method="post">
297 <fieldset class="checkout brief">
298 [% IF ( Koha.Preference('SelfCheckoutByLogin') ) %]
299 <legend>Log in to your account</legend>
300 <label for="patronlogin">Login:</label>
301 <input type="text" id="patronlogin" class="focus" size="20" name="patronlogin" />
302 <label for="patronpw">Password:</label>
303 <input type="password" id="patronpw" size="20" name="patronpw" />
304 <fieldset class="action">
305 <button type="submit" class="btn">Log in</button>
308 <div class="input-append">
309 <label for="patronid">Please enter your card number:</label>
310 <input type="text" id="patronid" class="focus" size="20" name="patronid" autocomplete="off" />
311 <button type="submit" class="btn">Submit</button>
315 [% FOREACH INPUT IN INPUTS %]
316 <input type="hidden" name="[% INPUT.name |html %]" value="[% INPUT.value |html %]">
318 <input type="hidden" name="op" value="login" />
321 </div> <!-- / .sco_entry -->
322 [% END # / IF validuser %]
323 [% END # / UNLESS ( hide_main %]
324 [% IF ( Koha.Preference('SCOMainUserBlock' ) ) %]<div id="scomainuserblock">[% Koha.Preference('SCOMainUserBlock' ) %]</div>[% END %]
325 </div> <!-- / .span12 -->
326 </div> <!-- / .row-fluid -->
327 </div> <!-- / .container-fluid -->
328 </div> <!-- / .main -->
329 <span id="audio-alert"></span>
332 [% INCLUDE 'opac-bottom.inc' %]
333 [% BLOCK jsinclude %]
334 [% INCLUDE 'datatables.inc' %]
335 <script type="text/javascript">
337 function mungeHistory() {
338 // prevent back button from allowing form resubmission
339 if (history && history.pushState) {
340 history.replaceState(null, document.title, window.location.href);
344 function sco_init() {
345 mainTimeout = setTimeout(function() {
346 location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout';
347 }, [% SelfCheckTimeout %]);
349 function dofocus() { // named function req'd for body onload event by some FF and IE7 security models
350 // alert("dofocus called");
351 $(".focus:last").select();
353 var slip_re = /slip/;
354 function printx_window(print_type) {
355 var handler = print_type.match(slip_re) ? "printslip" : "moremember";
359 function checkout_confirm(patronid) {
360 var barcode = $("#barcode").val();
361 // alert("checkout_confirm('" + patronid + "') called for barcode '" + barcode + "'");
362 if (! barcode) { dofocus(); return false; } // no barcode
363 if (barcode == "__KOHA_NEW_CIRC__") { // magic barcode
364 window.location.href='/cgi-bin/koha/sco/sco-main.pl?op=logout';
369 [% IF Koha.Preference('AudioAlerts') %]
370 var AUDIO_ALERTS = JSON.parse( '[% AudioAlerts.AudioAlerts | replace( "'", "\\'" ) | replace( '"', '\\"' ) %]' );
371 $( document ).ready(function() {
372 if ( AUDIO_ALERTS ) {
373 for ( var k in AUDIO_ALERTS ) {
374 var alert = AUDIO_ALERTS[k];
375 if ( $( alert.selector ).length ) {
376 playSound( alert.sound );
382 function playSound( sound ) {
383 if ( ( sound.indexOf('http://') == 0 || sound.indexOf('https://') == 0 ) ) {
384 document.getElementById("audio-alert").innerHTML = '<audio src="' + sound + '" autoplay="autoplay" autobuffer="autobuffer"></audio>';
390 $(document).ready(function() {
392 [% IF ( patronid ) %]sco_init();[% END %]
393 $("#loanTable").dataTable($.extend(true, {}, dataTablesDefaults, {
396 { "aTargets": [ "nosort" ], "bSortable": false, "bSearchable": false },
397 { "aTargets": [ "noshow" ], "bVisible": false, "bSearchable": false },
398 { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
399 { "sType": "title-string", "aTargets" : [ "title-string" ] }
403 $("#logout_form").submit(function(){
404 clearTimeout(mainTimeout);
405 [% IF Koha.Preference('SelfCheckReceiptPrompt') %]
406 var confirmStart = Date.now();
407 if(confirm(_("Would you like to print a receipt?"))){
408 if ( (Date.now() - confirmStart) < [% SelfCheckTimeout %] ) {
409 window.open("/cgi-bin/koha/sco/printslip.pl?borrowernumber=[% borrowernumber %]&print=qslip");
411 alert(_("Timeout while waiting for print confirmation"));
422 [% IF ( Koha.Preference('SCOUserJS') ) %]<script type="text/javascript">[% Koha.Preference('SCOUserJS') %]</script>[% END %]