|
Lines 400-406
Link Here
|
| 400 |
</div> <!-- / .row-fluid --> |
400 |
</div> <!-- / .row-fluid --> |
| 401 |
</div> <!-- / .container-fluid --> |
401 |
</div> <!-- / .container-fluid --> |
| 402 |
</div> <!-- / .main --> |
402 |
</div> <!-- / .main --> |
| 403 |
<span id="audio-alert"></span> |
403 |
|
|
|
404 |
<div class="modal fade" tabindex="-1" role="dialog" id="printConfirm"> |
| 405 |
<div class="modal-dialog" role="document"> |
| 406 |
<div class="modal-content"> |
| 407 |
<div class="modal-header"> |
| 408 |
<h5 class="modal-title">Print Receipt</h5> |
| 409 |
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> |
| 410 |
<span aria-hidden="true">×</span> |
| 411 |
</button> |
| 412 |
</div> |
| 413 |
<div class="modal-body"> |
| 414 |
<p>Would you like to print a recipt?</p> |
| 415 |
</div> |
| 416 |
<div class="modal-footer"> |
| 417 |
<button type="button" class="btn btn-primary printConfirm">Yes</button> |
| 418 |
<button type="button" class="btn btn-secondary printDeny" data-dismiss="modal">No</button> |
| 419 |
</div> |
| 420 |
</div> |
| 421 |
</div> |
| 422 |
</div> |
| 423 |
<span id="audio-alert"></span> |
| 404 |
|
424 |
|
| 405 |
[% INCLUDE 'opac-bottom.inc' %] |
425 |
[% INCLUDE 'opac-bottom.inc' %] |
| 406 |
[% BLOCK jsinclude %] |
426 |
[% BLOCK jsinclude %] |
|
Lines 473-489
Link Here
|
| 473 |
] |
493 |
] |
| 474 |
})); |
494 |
})); |
| 475 |
|
495 |
|
| 476 |
$("#logout_form").submit(function(){ |
496 |
$("#logout_form").submit(function(e){ |
|
|
497 |
e.preventDefault(); |
| 477 |
clearTimeout(mainTimeout); |
498 |
clearTimeout(mainTimeout); |
| 478 |
[% IF Koha.Preference('SelfCheckReceiptPrompt') %] |
499 |
[% IF Koha.Preference('SelfCheckReceiptPrompt') %] |
|
|
500 |
$("#printConfirm").removeClass('fade'); |
| 479 |
var confirmStart = Date.now(); |
501 |
var confirmStart = Date.now(); |
| 480 |
if(confirm(_("Would you like to print a receipt?"))){ |
502 |
$(".printConfirm").click( function() { |
| 481 |
if ( (Date.now() - confirmStart) < [% SelfCheckTimeout | html %] ) { |
503 |
if ( (Date.now() - confirmStart) < [% SelfCheckTimeout | html %] ) { |
| 482 |
window.open("/cgi-bin/koha/sco/printslip.pl?borrowernumber=[% borrowernumber | html %]&print=qslip"); |
504 |
window.open("/cgi-bin/koha/sco/printslip.pl?borrowernumber=[% borrowernumber | html %]&print=qslip"); |
|
|
505 |
location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout'; |
| 483 |
} else { |
506 |
} else { |
| 484 |
alert(_("Timeout while waiting for print confirmation")); |
507 |
alert(_("Timeout while waiting for print confirmation")); |
| 485 |
} |
508 |
} |
| 486 |
} |
509 |
}) |
|
|
510 |
$(".printDeny").click( function() { |
| 511 |
location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout'; |
| 512 |
}) |
| 513 |
[% ELSE %] |
| 514 |
location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout'; |
| 487 |
[% END %] |
515 |
[% END %] |
| 488 |
|
516 |
|
| 489 |
return true; |
517 |
return true; |
| 490 |
- |
|
|