Bugzilla – Attachment 49562 Details for
Bug 11498
Prevent bypassing sco timeout with print dialog
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11498 - Prevent bypassing sco timeout with print dialog
Bug-11498---Prevent-bypassing-sco-timeout-with-pri.patch (text/plain), 2.35 KB, created by
Mirko Tietgen
on 2016-03-24 21:43:46 UTC
(
hide
)
Description:
Bug 11498 - Prevent bypassing sco timeout with print dialog
Filename:
MIME Type:
Creator:
Mirko Tietgen
Created:
2016-03-24 21:43:46 UTC
Size:
2.35 KB
patch
obsolete
>From e4eaa4b656e232a510073a24b88e09bd8df4b30f Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Marc=20V=C3=A9ron?= <veron@veron.ch> >Date: Wed, 10 Feb 2016 17:21:40 +0100 >Subject: [PATCH] Bug 11498 - Prevent bypassing sco timeout with print dialog > >This patch prevents bypassing the self check timeout with the print dialog. > >To test: >- Set syspref 'WebVasedSelfCheck' to 'Enable' >- Set syspref 'SelfCheckoutReceivePrompt' to 'Show' >- Set syspref 'SelfCheckTimeout' to 20 seconds >- Apply patch >- Go to SCO page (/cgi-bin/koha/sco/sco-main.pl) >- Enter card number >- Click 'Finish'. Dialog "Would you like to pritn a receipt?' appears. >- Confirm printing without waiting 20 seconds > => Result: Print slip, SCO page shows 'Please enter your card number' >- Enter card number again >- Click 'Finish'. Dialog "Would you like to pritn a receipt?' appears. >- Wait > 20 seconds (value of SelfCheckTimeout) and then confirm. > => Result: Message appears "Timeout while waiting for print confirmation" >- Click on OK. > => Result: Self checkout page refreshes (shows 'Please enter your card number') > >Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> >--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt >index 3f0b1f3..42d2508 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt >@@ -370,8 +370,13 @@ > $("#logout_form").submit(function(){ > clearTimeout(mainTimeout); > [% IF Koha.Preference('SelfCheckReceiptPrompt') %] >+ var confirmStart = Date.now(); > if(confirm(_("Would you like to print a receipt?"))){ >- window.open("/cgi-bin/koha/sco/printslip.pl?borrowernumber=[% borrowernumber %]&print=qslip"); >+ if ( (Date.now() - confirmStart) < [% SelfCheckTimeout %] ) { >+ window.open("/cgi-bin/koha/sco/printslip.pl?borrowernumber=[% borrowernumber %]&print=qslip"); >+ } else { >+ alert(_("Timeout while waiting for print confirmation")); >+ } > } > [% END %] > >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 11498
:
47859
|
49562
|
49608