From b4a84fb7c7ba2e075c7e8ef428b1709138b32090 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Sun, 20 Oct 2013 20:55:06 +0000 Subject: [PATCH] [SIGN-OFF]bug 10016: munge history in SCO to discourage resubmitting user login This patch uses history.replaceState (introduced in HTML5) to manipulate the browser history to encourage returning to the SCO patron barcode form if the back button is used. Note that a side effect of this patch is that if the user uses the help link, they will be prompted to enter their barcode again. It may be better to put the help inline with the rest of the SCO forms. To test: [1] Start a web-based self-check session. [2] Enter a patron barcode. [3] Allow the self-check session to time out. [4] Use the back button. You should get the patron barcode entry form; you should not be prompted to resubmit form input. [5] Enter a patron barcode, perform some transactions, then use the finish button. [6] Next, use the back button. You should get the patron barcode entry form. Signed-off-by: Galen Charlton Signed-off-by: Ed Veal --- .../opac-tmpl/bootstrap/en/modules/sco/sco-main.tt | 16 +++++++++++++--- .../opac-tmpl/prog/en/modules/sco/sco-main.tt | 14 ++++++++++++-- 2 files changed, 25 insertions(+), 5 deletions(-) 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 922a0db..b1c2f11 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 @@ -16,7 +16,7 @@ - + [% INCLUDE 'masthead-sco.inc' %]
@@ -309,8 +309,17 @@ [% INCLUDE 'datatables.inc' %] [% END %] [% IF ( SCOUserJS ) %][% END %] -[% END %] \ No newline at end of file +[% END %] diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/sco/sco-main.tt b/koha-tmpl/opac-tmpl/prog/en/modules/sco/sco-main.tt index 3803368..6ab8b11 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/sco/sco-main.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/sco/sco-main.tt @@ -15,8 +15,17 @@ [% INCLUDE 'datatables.inc' %]