Lines 513-527
Link Here
|
513 |
$("#logout_form").on("click", function(e){ |
513 |
$("#logout_form").on("click", function(e){ |
514 |
e.preventDefault(e); |
514 |
e.preventDefault(e); |
515 |
[% IF Koha.Preference('SelfCheckReceiptPrompt') %] |
515 |
[% IF Koha.Preference('SelfCheckReceiptPrompt') %] |
516 |
var confirmStart = Date.now(); |
|
|
517 |
confirmModal("", _("Would you like to print a receipt?"), _("Print receipt and end session"), _("End session"), function(result) { |
516 |
confirmModal("", _("Would you like to print a receipt?"), _("Print receipt and end session"), _("End session"), function(result) { |
518 |
if ( result && (Date.now() - confirmStart) < [% Koha.Preference('SelfCheckTimeout') | html %] ) { |
517 |
if ( result ){ |
519 |
var win = window.open("/cgi-bin/koha/sco/printslip.pl?print=qslip"); |
518 |
var win = window.open("/cgi-bin/koha/sco/printslip.pl?print=qslip"); |
520 |
location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout'; |
519 |
location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout'; |
521 |
} else { |
520 |
} else { |
522 |
location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout'; |
521 |
location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout'; |
523 |
} |
522 |
} |
524 |
}) |
523 |
}); |
525 |
[% ELSE %] |
524 |
[% ELSE %] |
526 |
location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout'; |
525 |
location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout'; |
527 |
[% END %] |
526 |
[% END %] |
528 |
- |
|
|