View | Details | Raw Unified | Return to bug 40158
Collapse All | Expand All

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt (-3 / +1 lines)
Lines 513-521 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
- 

Return to bug 40158