Lines 526-533
Link Here
|
526 |
</div> <!-- / .row --> |
526 |
</div> <!-- / .row --> |
527 |
</div> <!-- / .container-fluid --> |
527 |
</div> <!-- / .container-fluid --> |
528 |
</div> <!-- / .main --> |
528 |
</div> <!-- / .main --> |
|
|
529 |
|
529 |
<span id="audio-alert"></span> |
530 |
<span id="audio-alert"></span> |
530 |
|
531 |
|
|
|
532 |
<form action="/cgi-bin/koha/sco/sco-main.pl" id="logout_post_form" method="post"> |
533 |
[% INCLUDE 'csrf-token.inc' %] |
534 |
<input type="hidden" name="op" value="cud-logout" /> |
535 |
</form> |
536 |
|
531 |
[% INCLUDE 'opac-bottom.inc' %] |
537 |
[% INCLUDE 'opac-bottom.inc' %] |
532 |
[% BLOCK jsinclude %] |
538 |
[% BLOCK jsinclude %] |
533 |
[% INCLUDE 'datatables.inc' %] |
539 |
[% INCLUDE 'datatables.inc' %] |
Lines 547-556
Link Here
|
547 |
//NOTE: There can only be 1 sco_login_timer at a time |
553 |
//NOTE: There can only be 1 sco_login_timer at a time |
548 |
if ( ! window.sco_login_timer ){ |
554 |
if ( ! window.sco_login_timer ){ |
549 |
const idleTimeout = "[% Koha.Preference('SelfCheckTimeout') || 120 | html %]"; |
555 |
const idleTimeout = "[% Koha.Preference('SelfCheckTimeout') || 120 | html %]"; |
550 |
const home_href = "/cgi-bin/koha/sco/sco-main.pl?op=logout"; |
556 |
const home_href = "/cgi-bin/koha/sco/sco-main.pl"; |
551 |
const sco_timer = new sc_timer({ |
557 |
const sco_timer = new sc_timer({ |
552 |
"idle_timeout": idleTimeout, |
558 |
"idle_timeout": idleTimeout, |
553 |
"redirect_url": home_href |
559 |
"form_id": "logout_post_form", |
554 |
}); |
560 |
}); |
555 |
window.sco_login_timer = sco_timer; |
561 |
window.sco_login_timer = sco_timer; |
556 |
sco_timer.start_timer(); |
562 |
sco_timer.start_timer(); |
Lines 571-577
Link Here
|
571 |
// alert("checkout_confirm('" + patronid + "') called for barcode '" + barcode + "'"); |
577 |
// alert("checkout_confirm('" + patronid + "') called for barcode '" + barcode + "'"); |
572 |
if (! barcode) { dofocus(); return false; } // no barcode |
578 |
if (! barcode) { dofocus(); return false; } // no barcode |
573 |
if (barcode == "__KOHA_NEW_CIRC__") { // magic barcode |
579 |
if (barcode == "__KOHA_NEW_CIRC__") { // magic barcode |
574 |
window.location.href='/cgi-bin/koha/sco/sco-main.pl?op=logout'; |
580 |
$("#logout_post_form").submit(); |
575 |
return false; |
581 |
return false; |
576 |
} |
582 |
} |
577 |
return true; |
583 |
return true; |
Lines 645-657
Link Here
|
645 |
confirmModal("", _("Would you like to print a receipt?"), _("Print receipt and end session"), _("End session"), function(result) { |
651 |
confirmModal("", _("Would you like to print a receipt?"), _("Print receipt and end session"), _("End session"), function(result) { |
646 |
if ( result && (Date.now() - confirmStart) < [% Koha.Preference('SelfCheckTimeout') | html %] ) { |
652 |
if ( result && (Date.now() - confirmStart) < [% Koha.Preference('SelfCheckTimeout') | html %] ) { |
647 |
var win = window.open("/cgi-bin/koha/sco/printslip.pl?print=qslip"); |
653 |
var win = window.open("/cgi-bin/koha/sco/printslip.pl?print=qslip"); |
648 |
location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout'; |
654 |
$("#logout_post_form").submit(); |
649 |
} else { |
655 |
} else { |
650 |
location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout'; |
656 |
$("#logout_post_form").submit(); |
651 |
} |
657 |
} |
652 |
}) |
658 |
}) |
653 |
[% ELSE %] |
659 |
[% ELSE %] |
654 |
location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout'; |
660 |
$("#logout_post_form").submit(); |
655 |
[% END %] |
661 |
[% END %] |
656 |
|
662 |
|
657 |
return true; |
663 |
return true; |