|
Lines 178-203
Link Here
|
| 178 |
[% END # / IF patronid %] |
178 |
[% END # / IF patronid %] |
| 179 |
|
179 |
|
| 180 |
[% IF ( validuser ) %] |
180 |
[% IF ( validuser ) %] |
| 181 |
<div id="newcheckout" class="sco_entry"> |
181 |
|
| 182 |
<form id="scan_form" name="scan_form" method="post" action="/cgi-bin/koha/sco/sco-main.pl" onsubmit="return checkout_confirm('[% patronid %]');"> |
182 |
<!-- Nav tabs --> |
|
|
183 |
<ul class="nav nav-tabs" role="tablist"> |
| 184 |
[% IF ( op_sanitized == 'checkout' ) %] |
| 185 |
<li role="presentation" class="active"><a href="#checkout" aria-controls="checkout" role="tab" data-toggle="tab">Checkout</a></li> |
| 186 |
[% ELSE %] |
| 187 |
<li role="presentation"><a href="#checkout" aria-controls="checkout" role="tab" data-toggle="tab">Checkout</a></li> |
| 188 |
[% END %] |
| 189 |
[% IF ( op_sanitized == 'renew' ) %] |
| 190 |
<li role="presentation" class="active"><a href="#renew" aria-controls="renew" role="tab" data-toggle="tab">Renew</a></li> |
| 191 |
[% ELSE %] |
| 192 |
<li role="presentation"><a href="#renew" aria-controls="renew" role="tab" data-toggle="tab">Renew</a></li> |
| 193 |
[% END %] |
| 194 |
[% IF ( AllowSelfCheckReturns ) %] |
| 195 |
[% IF ( op_sanitized == 'return' ) %] |
| 196 |
<li role="presentation" class="active"><a href="#return" aria-controls="return" role="tab" data-toggle="tab">Return</a></li> |
| 197 |
[% ELSE %] |
| 198 |
<li role="presentation"><a href="#return" aria-controls="return" role="tab" data-toggle="tab">Return</a></li> |
| 199 |
[% END %] |
| 200 |
[% END %] |
| 201 |
</ul> |
| 202 |
|
| 203 |
<!-- Tab panes --> |
| 204 |
<div class="tab-content"> |
| 205 |
[% IF ( op_sanitized == 'checkout' ) %] |
| 206 |
<div role="tabpanel" class="tab-pane active" id="checkout"> |
| 207 |
[% ELSE %] |
| 208 |
<div role="tabpanel" class="tab-pane" id="checkout"> |
| 209 |
[% END %] |
| 210 |
<form id="scan_form" name="scan_form" method="post" action="/cgi-bin/koha/sco/sco-main.pl" onsubmit="return checkout_confirm('checkout', '[% patronid %]');"> |
| 183 |
<fieldset> |
211 |
<fieldset> |
| 184 |
<legend>Check out[% IF ( AllowSelfCheckReturns ) %], return[% END %] or renew an item: </legend> |
212 |
<div class="input-append"> |
| 185 |
<div class="input-append"> |
213 |
<label for="checkout-barcode">Scan a new item or enter its barcode to checkout:</label> |
| 186 |
<label for="barcode">Scan a new item or enter its barcode:</label> |
214 |
<input id="checkout-barcode" name="barcode" size="20" type="text" class="form-control focus" autocomplete="off" /> |
| 187 |
<input id="barcode" name="barcode" size="20" type="text" class="focus" autocomplete="off" /> |
215 |
<span class="input-group-btn"> |
| 188 |
<button type="submit" class="btn">Submit</button> |
216 |
<button type="submit" class="btn btn-default" type="button">Submit</button> |
| 189 |
</div> |
217 |
</span> |
| 190 |
<input type="hidden" name="op" value="checkout" /> |
218 |
</div> |
| 191 |
<input type="hidden" name="patronid" value="[% patronid %]" /> |
219 |
<input type="hidden" name="op" value="checkout" /> |
| 192 |
</fieldset> |
220 |
<input type="hidden" name="patronid" value="[% patronid %]" /> |
|
|
221 |
</fieldset> |
| 193 |
</form> |
222 |
</form> |
|
|
223 |
</div> <!-- / #checkout --> |
| 194 |
|
224 |
|
| 195 |
<div> |
225 |
[% IF ( op_sanitized == 'renew' ) %] |
| 196 |
<form method="post" action="#" id="logout_form"> |
226 |
<div role="tabpanel" class="tab-pane active" id="renew"> |
| 197 |
<button type="submit" class="btn"><i class="icon finish"></i> Finish</button> |
227 |
[% ELSE %] |
| 198 |
</form> |
228 |
<div role="tabpanel" class="tab-pane" id="renew"> |
| 199 |
</div> |
229 |
[% END %] |
| 200 |
</div> <!-- / #newcheckout --> |
230 |
<form id="scan_form" name="scan_form" method="post" action="/cgi-bin/koha/sco/sco-main.pl" onsubmit="return checkout_confirm('renew', '[% patronid %]');"> |
|
|
231 |
<fieldset> |
| 232 |
<div class="input-append"> |
| 233 |
<label for="renew-barcode">Scan a new item or enter its barcode to renew it:</label> |
| 234 |
<input id="renew-barcode" name="barcode" size="20" type="text" class="form-control focus" autocomplete="off" /> |
| 235 |
<button type="submit" class="btn">Submit</button> |
| 236 |
</div> |
| 237 |
<input type="hidden" name="op" value="renew" /> |
| 238 |
<input type="hidden" name="patronid" value="[% patronid %]" /> |
| 239 |
</fieldset> |
| 240 |
</form> |
| 241 |
</div> <!-- / #renew --> |
| 242 |
|
| 243 |
[% IF ( AllowSelfCheckReturns ) %] |
| 244 |
[% IF ( op_sanitized == 'return' ) %] |
| 245 |
<div role="tabpanel" class="tab-pane active" id="return"> |
| 246 |
[% ELSE %] |
| 247 |
<div role="tabpanel" class="tab-pane" id="return"> |
| 248 |
[% END %] |
| 249 |
<form id="scan_form" name="scan_form" method="post" action="/cgi-bin/koha/sco/sco-main.pl" onsubmit="return checkout_confirm('return', '[% patronid %]');"> |
| 250 |
<fieldset> |
| 251 |
<div class="input-append"> |
| 252 |
<label for="return-barcode">Scan a new item or enter its barcode to return it:</label> |
| 253 |
<input id="return-barcode" name="barcode" size="20" type="text" class="form-control focus" autocomplete="off" /> |
| 254 |
<button type="submit" class="btn">Submit</button> |
| 255 |
</div> |
| 256 |
<input type="hidden" name="op" value="returnbook" /> |
| 257 |
<input type="hidden" name="patronid" value="[% patronid %]" /> |
| 258 |
</fieldset> |
| 259 |
</form> |
| 260 |
</div> <!-- / #return --> |
| 261 |
[% END %] |
| 262 |
</div> <!-- / #tab-content--> |
| 263 |
|
| 264 |
<div class="finish-button"> |
| 265 |
<form method="post" action="#" id="logout_form"> |
| 266 |
<button type="submit" class="btn"><i class="icon finish"></i> Finish</button> |
| 267 |
</form> |
| 268 |
</div> |
| 201 |
</div> <!-- / .span12/12 --> |
269 |
</div> <!-- / .span12/12 --> |
| 202 |
[% IF ( display_patron_image ) %] |
270 |
[% IF ( display_patron_image ) %] |
| 203 |
<div class="span2"> |
271 |
<div class="span2"> |
|
Lines 318-324
Link Here
|
| 318 |
</div> <!-- / .container-fluid --> |
386 |
</div> <!-- / .container-fluid --> |
| 319 |
</div> <!-- / .main --> |
387 |
</div> <!-- / .main --> |
| 320 |
<span id="audio-alert"></span> |
388 |
<span id="audio-alert"></span> |
| 321 |
</body> |
|
|
| 322 |
|
389 |
|
| 323 |
[% INCLUDE 'opac-bottom.inc' %] |
390 |
[% INCLUDE 'opac-bottom.inc' %] |
| 324 |
[% BLOCK jsinclude %] |
391 |
[% BLOCK jsinclude %] |
|
Lines 347-354
Link Here
|
| 347 |
|
414 |
|
| 348 |
return false; |
415 |
return false; |
| 349 |
} |
416 |
} |
| 350 |
function checkout_confirm(patronid) { |
417 |
function checkout_confirm(target, patronid) { |
| 351 |
var barcode = $("#barcode").val(); |
418 |
var barcode = $("#" + target + "-barcode").val(); |
| 352 |
// alert("checkout_confirm('" + patronid + "') called for barcode '" + barcode + "'"); |
419 |
// alert("checkout_confirm('" + patronid + "') called for barcode '" + barcode + "'"); |
| 353 |
if (! barcode) { dofocus(); return false; } // no barcode |
420 |
if (! barcode) { dofocus(); return false; } // no barcode |
| 354 |
if (barcode == "__KOHA_NEW_CIRC__") { // magic barcode |
421 |
if (barcode == "__KOHA_NEW_CIRC__") { // magic barcode |
|
Lines 406-411
Link Here
|
| 406 |
|
473 |
|
| 407 |
return true; |
474 |
return true; |
| 408 |
}); |
475 |
}); |
|
|
476 |
|
| 477 |
// Make sure the barcode box on the selected tab is given focus |
| 478 |
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) { |
| 479 |
var target = $(e.target).attr("href"); |
| 480 |
$(target + '-barcode').focus(); |
| 481 |
}); |
| 482 |
|
| 409 |
}); |
483 |
}); |
| 410 |
//]]> |
484 |
//]]> |
| 411 |
</script> |
485 |
</script> |