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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt (-7 / +11 lines)
Lines 473-489 Link Here
473
                ]
473
                ]
474
            }));
474
            }));
475
475
476
            $("#logout_form").submit(function(){
476
            $("#logout_form").submit(function(e){
477
                e.preventDefault(e);
477
                clearTimeout(mainTimeout);
478
                clearTimeout(mainTimeout);
478
                [% IF Koha.Preference('SelfCheckReceiptPrompt') %]
479
                [% IF Koha.Preference('SelfCheckReceiptPrompt') %]
479
                    var confirmStart = Date.now();
480
                    var confirmStart = Date.now();
480
                    if(confirm(_("Would you like to print a receipt?"))){
481
					confirmModal("", _("Would you like to print a receipt?"), _("Yes"), _("No"), function(result) {
481
                        if ( (Date.now() - confirmStart) < [% SelfCheckTimeout | html %] ) {
482
                        if ( result && (Date.now() - confirmStart) < [% SelfCheckTimeout | html %] ) {
482
                            window.open("/cgi-bin/koha/sco/printslip.pl?borrowernumber=[% borrowernumber | html %]&amp;print=qslip");
483
                            var win = window.open("/cgi-bin/koha/sco/printslip.pl?borrowernumber=[% borrowernumber | html %]&amp;print=qslip");
484
                            win.print();
485
                            location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout';
483
                        } else {
486
                        } else {
484
                            alert(_("Timeout while waiting for print confirmation"));
487
                            location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout';
485
                        }
488
                        }
486
                    }
489
                    })
490
                [% ELSE %]
491
                    location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout';
487
                [% END %]
492
                [% END %]
488
493
489
                return true;
494
                return true;
490
- 

Return to bug 21565