Lines 182-207
Link Here
|
182 |
[% END # / IF patronid %] |
182 |
[% END # / IF patronid %] |
183 |
|
183 |
|
184 |
[% IF ( validuser ) %] |
184 |
[% IF ( validuser ) %] |
185 |
<div id="newcheckout" class="sco_entry"> |
185 |
|
186 |
<form id="scan_form" name="scan_form" method="post" action="/cgi-bin/koha/sco/sco-main.pl" onsubmit="return checkout_confirm('[% patronid %]');"> |
186 |
<!-- Nav tabs --> |
|
|
187 |
<ul class="nav nav-tabs" role="tablist"> |
188 |
[% IF ( op_sanitized == 'checkout' ) %] |
189 |
<li role="presentation" class="active"><a href="#checkout" aria-controls="checkout" role="tab" data-toggle="tab">Checkout</a></li> |
190 |
[% ELSE %] |
191 |
<li role="presentation"><a href="#checkout" aria-controls="checkout" role="tab" data-toggle="tab">Checkout</a></li> |
192 |
[% END %] |
193 |
[% IF ( op_sanitized == 'renew' ) %] |
194 |
<li role="presentation" class="active"><a href="#renew" aria-controls="renew" role="tab" data-toggle="tab">Renew</a></li> |
195 |
[% ELSE %] |
196 |
<li role="presentation"><a href="#renew" aria-controls="renew" role="tab" data-toggle="tab">Renew</a></li> |
197 |
[% END %] |
198 |
[% IF ( Koha.Preference('AllowSelfCheckReturns') ) %] |
199 |
[% IF ( op_sanitized == 'return' ) %] |
200 |
<li role="presentation" class="active"><a href="#return" aria-controls="return" role="tab" data-toggle="tab">Return</a></li> |
201 |
[% ELSE %] |
202 |
<li role="presentation"><a href="#return" aria-controls="return" role="tab" data-toggle="tab">Return</a></li> |
203 |
[% END %] |
204 |
[% END %] |
205 |
</ul> |
206 |
|
207 |
<!-- Tab panes --> |
208 |
<div class="tab-content"> |
209 |
[% IF ( op_sanitized == 'checkout' ) %] |
210 |
<div role="tabpanel" class="tab-pane active" id="checkout"> |
211 |
[% ELSE %] |
212 |
<div role="tabpanel" class="tab-pane" id="checkout"> |
213 |
[% END %] |
214 |
<form id="scan_form" name="scan_form" method="post" action="/cgi-bin/koha/sco/sco-main.pl" onsubmit="return checkout_confirm('checkout', '[% patronid %]');"> |
187 |
<fieldset> |
215 |
<fieldset> |
188 |
<legend>Check out[% IF ( Koha.Preference('AllowSelfCheckReturns') ) %], return[% END %] or renew an item: </legend> |
216 |
<div class="input-append"> |
189 |
<div class="input-append"> |
217 |
<label for="checkout-barcode">Scan a new item or enter its barcode to checkout:</label> |
190 |
<label for="barcode">Scan a new item or enter its barcode:</label> |
218 |
<input id="checkout-barcode" name="barcode" size="20" type="text" class="form-control focus" autocomplete="off" /> |
191 |
<input id="barcode" name="barcode" size="20" type="text" class="focus" autocomplete="off" /> |
219 |
<span class="input-group-btn"> |
192 |
<button type="submit" class="btn">Submit</button> |
220 |
<button type="submit" class="btn btn-default" type="button">Submit</button> |
193 |
</div> |
221 |
</span> |
194 |
<input type="hidden" name="op" value="checkout" /> |
222 |
</div> |
195 |
<input type="hidden" name="patronid" value="[% patronid %]" /> |
223 |
<input type="hidden" name="op" value="checkout" /> |
196 |
</fieldset> |
224 |
<input type="hidden" name="patronid" value="[% patronid %]" /> |
|
|
225 |
</fieldset> |
197 |
</form> |
226 |
</form> |
|
|
227 |
</div> <!-- / #checkout --> |
198 |
|
228 |
|
199 |
<div> |
229 |
[% IF ( op_sanitized == 'renew' ) %] |
200 |
<form method="post" action="#" id="logout_form"> |
230 |
<div role="tabpanel" class="tab-pane active" id="renew"> |
201 |
<button type="submit" class="btn"><i class="icon finish"></i> Finish</button> |
231 |
[% ELSE %] |
202 |
</form> |
232 |
<div role="tabpanel" class="tab-pane" id="renew"> |
203 |
</div> |
233 |
[% END %] |
204 |
</div> <!-- / #newcheckout --> |
234 |
<form id="scan_form" name="scan_form" method="post" action="/cgi-bin/koha/sco/sco-main.pl" onsubmit="return checkout_confirm('renew', '[% patronid %]');"> |
|
|
235 |
<fieldset> |
236 |
<div class="input-append"> |
237 |
<label for="renew-barcode">Scan a new item or enter its barcode to renew it:</label> |
238 |
<input id="renew-barcode" name="barcode" size="20" type="text" class="form-control focus" autocomplete="off" /> |
239 |
<button type="submit" class="btn">Submit</button> |
240 |
</div> |
241 |
<input type="hidden" name="op" value="renew" /> |
242 |
<input type="hidden" name="patronid" value="[% patronid %]" /> |
243 |
</fieldset> |
244 |
</form> |
245 |
</div> <!-- / #renew --> |
246 |
|
247 |
[% IF ( Koha.Preference('AllowSelfCheckReturns') ) %] |
248 |
[% IF ( op_sanitized == 'return' ) %] |
249 |
<div role="tabpanel" class="tab-pane active" id="return"> |
250 |
[% ELSE %] |
251 |
<div role="tabpanel" class="tab-pane" id="return"> |
252 |
[% END %] |
253 |
<form id="scan_form" name="scan_form" method="post" action="/cgi-bin/koha/sco/sco-main.pl" onsubmit="return checkout_confirm('return', '[% patronid %]');"> |
254 |
<fieldset> |
255 |
<div class="input-append"> |
256 |
<label for="return-barcode">Scan a new item or enter its barcode to return it:</label> |
257 |
<input id="return-barcode" name="barcode" size="20" type="text" class="form-control focus" autocomplete="off" /> |
258 |
<button type="submit" class="btn">Submit</button> |
259 |
</div> |
260 |
<input type="hidden" name="op" value="returnbook" /> |
261 |
<input type="hidden" name="patronid" value="[% patronid %]" /> |
262 |
</fieldset> |
263 |
</form> |
264 |
</div> <!-- / #return --> |
265 |
[% END %] |
266 |
</div> <!-- / #tab-content--> |
267 |
|
268 |
<div class="finish-button"> |
269 |
<form method="post" action="#" id="logout_form"> |
270 |
<button type="submit" class="btn"><i class="icon finish"></i> Finish</button> |
271 |
</form> |
272 |
</div> |
205 |
</div> <!-- / .span12/12 --> |
273 |
</div> <!-- / .span12/12 --> |
206 |
[% IF ( display_patron_image ) %] |
274 |
[% IF ( display_patron_image ) %] |
207 |
<div class="span2"> |
275 |
<div class="span2"> |
Lines 327-333
Link Here
|
327 |
</div> <!-- / .container-fluid --> |
395 |
</div> <!-- / .container-fluid --> |
328 |
</div> <!-- / .main --> |
396 |
</div> <!-- / .main --> |
329 |
<span id="audio-alert"></span> |
397 |
<span id="audio-alert"></span> |
330 |
</body> |
|
|
331 |
|
398 |
|
332 |
[% INCLUDE 'opac-bottom.inc' %] |
399 |
[% INCLUDE 'opac-bottom.inc' %] |
333 |
[% BLOCK jsinclude %] |
400 |
[% BLOCK jsinclude %] |
Lines 356-363
Link Here
|
356 |
|
423 |
|
357 |
return false; |
424 |
return false; |
358 |
} |
425 |
} |
359 |
function checkout_confirm(patronid) { |
426 |
function checkout_confirm(target, patronid) { |
360 |
var barcode = $("#barcode").val(); |
427 |
var barcode = $("#" + target + "-barcode").val(); |
361 |
// alert("checkout_confirm('" + patronid + "') called for barcode '" + barcode + "'"); |
428 |
// alert("checkout_confirm('" + patronid + "') called for barcode '" + barcode + "'"); |
362 |
if (! barcode) { dofocus(); return false; } // no barcode |
429 |
if (! barcode) { dofocus(); return false; } // no barcode |
363 |
if (barcode == "__KOHA_NEW_CIRC__") { // magic barcode |
430 |
if (barcode == "__KOHA_NEW_CIRC__") { // magic barcode |
Lines 415-420
Link Here
|
415 |
|
482 |
|
416 |
return true; |
483 |
return true; |
417 |
}); |
484 |
}); |
|
|
485 |
|
486 |
// Make sure the barcode box on the selected tab is given focus |
487 |
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) { |
488 |
var target = $(e.target).attr("href"); |
489 |
$(target + '-barcode').focus(); |
490 |
}); |
491 |
|
418 |
}); |
492 |
}); |
419 |
//]]> |
493 |
//]]> |
420 |
</script> |
494 |
</script> |