Lines 11-20
Link Here
|
11 |
<script type="text/javascript" src="[% themelang %]/lib/jquery/jquery-ui.js"></script> |
11 |
<script type="text/javascript" src="[% themelang %]/lib/jquery/jquery-ui.js"></script> |
12 |
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script> |
12 |
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script> |
13 |
<script type="text/javascript">//<![CDATA[ |
13 |
<script type="text/javascript">//<![CDATA[ |
14 |
function sco_init(valid_session) { |
14 |
function sco_init() { |
15 |
if (valid_session == 1) { |
15 |
setTimeout("location.href='/cgi-bin/koha/sco/sco-main.pl?op=logout';",[% SelfCheckTimeout %]); |
16 |
setTimeout("location.href='/cgi-bin/koha/sco/sco-main.pl?op=logout';",[% SelfCheckTimeout %]); |
|
|
17 |
} |
18 |
} |
16 |
} |
19 |
function dofocus() { // named function req'd for body onload event by some FF and IE7 security models |
17 |
function dofocus() { // named function req'd for body onload event by some FF and IE7 security models |
20 |
// alert("dofocus called"); |
18 |
// alert("dofocus called"); |
Lines 34-46
function checkout_confirm(patronid) {
Link Here
|
34 |
window.location.href='/cgi-bin/koha/sco/sco-main.pl?op=logout'; |
32 |
window.location.href='/cgi-bin/koha/sco/sco-main.pl?op=logout'; |
35 |
return false; |
33 |
return false; |
36 |
} |
34 |
} |
37 |
if (this.valid_session == 0) { |
|
|
38 |
// probably should force logout like above ? --atz 6/09 |
39 |
if (confirm('Session has expired. Click \'OK\' to continue processing this item. Click Cancel if you are not ' + patronid)){ |
40 |
this.op.value='logout'; |
41 |
this.patronid.value=''; |
42 |
} |
43 |
} |
44 |
return true; |
35 |
return true; |
45 |
} |
36 |
} |
46 |
|
37 |
|
Lines 81-89
$.tablesorter.addParser({
Link Here
|
81 |
}); |
72 |
}); |
82 |
|
73 |
|
83 |
$(document).ready(function() { |
74 |
$(document).ready(function() { |
84 |
[% IF ( patronid ) %] sco_init(1); |
75 |
dofocus(); |
85 |
[% ELSIF ( timedout ) %] sco_init(1); |
76 |
[% IF ( patronid ) %]sco_init();[% END %] |
86 |
[% END %] |
|
|
87 |
$("#loanTable").tablesorter({ |
77 |
$("#loanTable").tablesorter({ |
88 |
[% IF ( dateformat_metric ) %] |
78 |
[% IF ( dateformat_metric ) %] |
89 |
dateFormat: 'uk', |
79 |
dateFormat: 'uk', |
Lines 130-136
$(document).ready(function(){
Link Here
|
130 |
[% IF ( circ_error_UNKNOWN_BARCODE ) %] |
120 |
[% IF ( circ_error_UNKNOWN_BARCODE ) %] |
131 |
<em>MESSAGE 1:</em> The system does not recognize this barcode. |
121 |
<em>MESSAGE 1:</em> The system does not recognize this barcode. |
132 |
[% ELSIF ( circ_error_TOO_MANY ) %] |
122 |
[% ELSIF ( circ_error_TOO_MANY ) %] |
133 |
<em>MESSAGE 2:</em> You have borrowed too many items and can't check out any more. |
123 |
<em>MESSAGE 2:</em> You have checked out too many items and can't check out any more. |
134 |
[% ELSIF ( circ_error_ISSUED_TO_ANOTHER ) %] |
124 |
[% ELSIF ( circ_error_ISSUED_TO_ANOTHER ) %] |
135 |
<em>MESSAGE 3:</em> This item is checked out to someone else. |
125 |
<em>MESSAGE 3:</em> This item is checked out to someone else. |
136 |
[% ELSIF ( circ_error_NO_MORE_RENEWALS ) %] |
126 |
[% ELSIF ( circ_error_NO_MORE_RENEWALS ) %] |
Lines 138-150
$(document).ready(function(){
Link Here
|
138 |
[% ELSIF ( circ_error_NOT_FOR_LOAN ) %] |
128 |
[% ELSIF ( circ_error_NOT_FOR_LOAN ) %] |
139 |
<em>MESSAGE 5:</em> This item is not for loan. |
129 |
<em>MESSAGE 5:</em> This item is not for loan. |
140 |
[% ELSIF ( circ_error_DEBT ) %] |
130 |
[% ELSIF ( circ_error_DEBT ) %] |
141 |
<em>MESSAGE 6:</em> You owe the library [% amount %] and cannot borrow. |
131 |
<em>MESSAGE 6:</em> You owe the library [% amount %] and cannot check out. |
142 |
[% ELSIF ( circ_error_WTHDRAWN ) %] |
132 |
[% ELSIF ( circ_error_WTHDRAWN ) %] |
143 |
<em>MESSAGE 7:</em> This item has been withdrawn from the collection. |
133 |
<em>MESSAGE 7:</em> This item has been withdrawn from the collection. |
144 |
[% ELSIF ( circ_error_RESTRICTED ) %] |
134 |
[% ELSIF ( circ_error_RESTRICTED ) %] |
145 |
<em>MESSAGE 8:</em> |
135 |
<em>MESSAGE 8:</em> |
146 |
[% ELSIF ( circ_error_RESERVED ) %] |
136 |
[% ELSIF ( circ_error_RESERVED ) %] |
147 |
<em>MESSAGE 9:</em> This item is reserved for another patron. |
137 |
<em>MESSAGE 9:</em> This item is on hold for another patron. |
148 |
[% ELSIF ( circ_error_ITEMNOTSAMEBRANCH ) %] |
138 |
[% ELSIF ( circ_error_ITEMNOTSAMEBRANCH ) %] |
149 |
<em>MESSAGE 10:</em> |
139 |
<em>MESSAGE 10:</em> |
150 |
[% ELSIF ( circ_error_EXPIRED ) %] |
140 |
[% ELSIF ( circ_error_EXPIRED ) %] |
Lines 160-203
$(document).ready(function(){
Link Here
|
160 |
[% END %] |
150 |
[% END %] |
161 |
Please see a member of the library staff. |
151 |
Please see a member of the library staff. |
162 |
</p> |
152 |
</p> |
163 |
<form action="/cgi-bin/koha/sco/sco-main.pl" name="errorForm" method="post"> |
|
|
164 |
<input type="hidden" name="op" value="login" /> |
165 |
<input type="hidden" name="patronid" value="[% patronid %]" /> |
166 |
[% IF ( returnitem ) %] |
153 |
[% IF ( returnitem ) %] |
167 |
[% IF ( AllowSelfCheckReturns ) %] |
154 |
[% IF ( AllowSelfCheckReturns ) %] |
168 |
<input type="hidden" name="barcode" value="[% barcode %]" /> |
155 |
<form action="/cgi-bin/koha/sco/sco-main.pl" name="errorForm" class="inline" method="post"> |
169 |
<input type="button" name="returnbook" value="Return this item" class="return" onclick="this.form.op.value='returnbook';this.form.submit();" /> |
156 |
<input type="hidden" name="op" value="returnbook" /> |
|
|
157 |
<input type="hidden" name="patronid" value="[% patronid %]" /> |
158 |
<input type="hidden" name="barcode" value="[% barcode %]" /> |
159 |
<input type="submit" name="returnbook" value="Return this item" class="return" /> |
160 |
</form> |
161 |
<form action="/cgi-bin/koha/sco/sco-main.pl" name="errorForm" class="inline" method="post"> |
162 |
<input type="hidden" name="op" value="" /> |
163 |
<input type="hidden" name="patronid" value="[% patronid %]" /> |
164 |
<input type="hidden" name="barcode" value="[% barcode %]" /> |
165 |
<input type="submit" name= "confirm" value="Return to account summary" class="back focus" /> |
166 |
</form> |
170 |
[% END %] |
167 |
[% END %] |
171 |
[% END %] |
168 |
[% END %] |
172 |
<input type="submit" name= "confirm" value="Return to Account Summary" class="back focus" /> |
|
|
173 |
</form> |
174 |
[% END %] |
169 |
[% END %] |
175 |
[% IF ( confirm ) %]<!-- We need to confirm the issue.. --> |
170 |
[% IF ( confirm ) %]<!-- We need to confirm the issue.. --> |
176 |
<div class="dialog alert"><h3>Please confirm the checkout:</h3> |
171 |
<div class="dialog alert"><h3>Please confirm the checkout:</h3> |
177 |
<p>[% IF ( confirm_renew_issue ) %]This item is already checked out to you.[% END %]</p> |
172 |
<p>[% IF ( confirm_renew_issue ) %]This item is already checked out to you.[% END %]</p> |
178 |
|
173 |
|
179 |
<form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" method="post"> |
|
|
180 |
<input type="hidden" name="op" value="checkout" /> |
181 |
<input type="hidden" name="patronid" value="[% patronid %]" /> |
182 |
<input type="hidden" name="barcode" value="[% barcode %]" /> |
183 |
<input type="hidden" name="confirmed" value="" /> |
184 |
[% IF ( renew ) %] |
174 |
[% IF ( renew ) %] |
185 |
[% IF ( AllowSelfCheckReturns ) %] |
175 |
[% IF ( AllowSelfCheckReturns ) %] |
186 |
<input type="button" value="Return item" name="confirm" class="return" onclick="this.form.op.value='returnbook';this.form.submit();" /> |
176 |
<form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post"> |
|
|
177 |
<input type="hidden" name="op" value="returnbook" /> |
178 |
<input type="hidden" name="patronid" value="[% patronid %]" /> |
179 |
<input type="hidden" name="barcode" value="[% barcode %]" /> |
180 |
<input type="hidden" name="confirmed" value="" /> |
181 |
<input type="submit" value="Return item" name="confirm" class="return" /> |
182 |
</form> |
187 |
[% END %] |
183 |
[% END %] |
188 |
[% END %] |
184 |
[% END %] |
189 |
[% UNLESS ( renew ) %]<input type="button" value="Renew item" name="confirm" class="renew" onclick="this.form.confirmed.value='1';this.form.submit();" /> |
185 |
|
190 |
[% ELSE %]<input type="button" value="Renew item" class="renew" onclick="this.form.confirmed.value='1';this.form.submit();" />[% END %] |
186 |
[% UNLESS ( renew ) %] |
191 |
<input type="button" value="Cancel" class="cancel" onclick="this.form.op.value='';this.form.submit();return true;" /> |
187 |
<form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post"> |
192 |
</form> |
188 |
<input type="hidden" name="op" value="checkout" /> |
|
|
189 |
<input type="hidden" name="patronid" value="[% patronid %]" /> |
190 |
<input type="hidden" name="barcode" value="[% barcode %]" /> |
191 |
<input type="hidden" name="confirmed" value="1" /> |
192 |
<input type="submit" value="Renew item" name="confirm" class="renew" /> |
193 |
</form> |
194 |
[% ELSE %] |
195 |
<form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post"> |
196 |
<input type="hidden" name="op" value="checkout" /> |
197 |
<input type="hidden" name="patronid" value="[% patronid %]" /> |
198 |
<input type="hidden" name="barcode" value="[% barcode %]" /> |
199 |
<input type="hidden" name="confirmed" value="1" /> |
200 |
<input type="submit" value="Renew item" class="renew" /> |
201 |
</form> |
202 |
[% END %] |
203 |
<form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post"> |
204 |
<input type="hidden" name="op" value="" /> |
205 |
<input type="hidden" name="patronid" value="[% patronid %]" /> |
206 |
<input type="submit" value="Cancel" class="cancel" /> |
207 |
</form> |
193 |
</div> |
208 |
</div> |
194 |
[% END %] |
209 |
[% END %] |
195 |
|
210 |
|
196 |
[% IF ( nopermission ) %]<!-- This is what is displayed if user doesnt have permission --><div class="dialog alert"><h3>Access denied</h3> |
211 |
[% IF ( nopermission ) %]<!-- This is what is displayed if user doesnt have permission --><div class="dialog alert"><h3>Access denied</h3> |
197 |
Sorry, this self-checkout station has lost authentication. Please contact the administrator to resolve this problem. </div> |
212 |
Sorry, this self-checkout station has lost authentication. Please contact the administrator to resolve this problem. </div> |
198 |
[% END %] |
213 |
[% END %] |
199 |
[% IF ( timed_out ) %]<!-- This is what is displayed if login has timed out --> |
|
|
200 |
<div class="dialog alert"><h3>Session timed out</h3>Sorry, your session has timed out, please log in again.</div>[% END %] |
201 |
[% IF ( different_ip ) %]<!-- This is what is displayed if user doesnt have permission --><div class="dialog alert"><h3>Session lost</h3>You are accessing self-checkout from a different IP address! please log in again.</div>[% END %] |
214 |
[% IF ( different_ip ) %]<!-- This is what is displayed if user doesnt have permission --><div class="dialog alert"><h3>Session lost</h3>You are accessing self-checkout from a different IP address! please log in again.</div>[% END %] |
202 |
[% IF ( invalid_username_or_password ) %] |
215 |
[% IF ( invalid_username_or_password ) %] |
203 |
<!-- This is what is displayed if user doesnt have permission --><div class="dialog alert"><h3>Record not found</h3><p>Your userid was not found in the database. Please try again.</p></div>[% END %] |
216 |
<!-- This is what is displayed if user doesnt have permission --><div class="dialog alert"><h3>Record not found</h3><p>Your userid was not found in the database. Please try again.</p></div>[% END %] |
Lines 224-243
Sorry, this self-checkout station has lost authentication. Please contact the a
Link Here
|
224 |
[% END %] |
237 |
[% END %] |
225 |
[% END %] |
238 |
[% END %] |
226 |
|
239 |
|
227 |
[% IF ( timedout ) %] |
|
|
228 |
<div class="dialog message"><h4>Sorry</h4><p>Your session has timed out due to inactivity. Please sign in.</p></div> |
229 |
<br /> |
230 |
[% END %] |
231 |
[% IF ( validuser ) %] |
240 |
[% IF ( validuser ) %] |
232 |
[% IF ( display_patron_image ) %]<div class="yui-ge"><div class="yui-u first">[% END %] |
241 |
[% IF ( display_patron_image ) %]<div class="yui-ge"><div class="yui-u first">[% END %] |
233 |
<div id="newcheckout" class="sco_entry"> |
242 |
<div id="newcheckout" class="sco_entry"> |
234 |
<form id="scan_form" name="scan_form" method="post" action="/cgi-bin/koha/sco/sco-main.pl" onsubmit="return checkout_confirm('[% patronid %]');"> |
243 |
<form id="scan_form" name="scan_form" method="post" action="/cgi-bin/koha/sco/sco-main.pl" onsubmit="return checkout_confirm('[% patronid %]');"> |
235 |
<fieldset><legend> Check out[% IF ( AllowSelfCheckReturns ) %], return[% END %] or renew an item: </legend> |
244 |
<fieldset><legend> Check out[% IF ( AllowSelfCheckReturns ) %], return[% END %] or renew an item: </legend> |
236 |
<label for="barcode">Scan a new item or enter its barcode:</label> |
245 |
<label for="barcode">Scan a new item or enter its barcode:</label> |
237 |
<input id="barcode" name="barcode" size="20" class="focus" /> |
246 |
<input id="barcode" name="barcode" size="20" class="focus" autocomplete="off" /> |
238 |
<input type="hidden" name="op" value="checkout" /> |
247 |
<input type="hidden" name="op" value="checkout" /> |
239 |
<input type="hidden" name="patronid" value="[% patronid %]" /> |
248 |
<input type="hidden" name="patronid" value="[% patronid %]" /> |
240 |
<input type="hidden" name="valid_session" value="1" /> |
|
|
241 |
<input type="submit" value="Submit" class="submit" /></fieldset> |
249 |
<input type="submit" value="Submit" class="submit" /></fieldset> |
242 |
</form> |
250 |
</form> |
243 |
<div><form method="post" action="#" id="logout_form"><input type="submit" value="Finish" class="finish" /></form></div> |
251 |
<div><form method="post" action="#" id="logout_form"><input type="submit" value="Finish" class="finish" /></form></div> |
Lines 305-311
Sorry, this self-checkout station has lost authentication. Please contact the a
Link Here
|
305 |
<input type="password" id="patronpw" size="20" name="patronpw" /> |
313 |
<input type="password" id="patronpw" size="20" name="patronpw" /> |
306 |
[% ELSE %] |
314 |
[% ELSE %] |
307 |
<fieldset class="checkout"><label for="patronid">Please enter your card number:</label> |
315 |
<fieldset class="checkout"><label for="patronid">Please enter your card number:</label> |
308 |
<input type="text" id="patronid" class="focus" size="20" name="patronid" /> |
316 |
<input type="text" id="patronid" class="focus" size="20" name="patronid" autocomplete="off" /> |
309 |
[% END %] |
317 |
[% END %] |
310 |
|
318 |
|
311 |
[% FOREACH INPUT IN INPUTS %]<input type="hidden" name="[% INPUT.name |html %]" value="[% INPUT.value |html %]">[% END %] |
319 |
[% FOREACH INPUT IN INPUTS %]<input type="hidden" name="[% INPUT.name |html %]" value="[% INPUT.value |html %]">[% END %] |