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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt (-4 / +2 lines)
Lines 641-655 Link Here
641
            $("#logout_form").on("click", function(e){
641
            $("#logout_form").on("click", function(e){
642
                e.preventDefault(e);
642
                e.preventDefault(e);
643
                [% IF Koha.Preference('SelfCheckReceiptPrompt') %]
643
                [% IF Koha.Preference('SelfCheckReceiptPrompt') %]
644
                    var confirmStart = Date.now();
645
                    confirmModal("", _("Would you like to print a receipt?"), _("Print receipt and end session"), _("End session"), function(result) {
644
                    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 %] ) {
645
                        if ( result ) {
647
                            var win = window.open("/cgi-bin/koha/sco/printslip.pl?print=qslip");
646
                            var win = window.open("/cgi-bin/koha/sco/printslip.pl?print=qslip");
648
                            location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout';
647
                            location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout';
649
                        } else {
648
                        } else {
650
                            location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout';
649
                            location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout';
651
                        }
650
                        }
652
                    })
651
                    });
653
                [% ELSE %]
652
                [% ELSE %]
654
                    location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout';
653
                    location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout';
655
                [% END %]
654
                [% END %]
656
- 

Return to bug 40108