Bugzilla – Attachment 59289 Details for
Bug 7556
Use "preventDoubleFormSubmit()" more in the OPAC and Intranet to prevent duplicate data
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7556 - Use "preventDoubleFormSubmit()" more in the OPAC
Bug-7556---Use-preventDoubleFormSubmit-more-in-the.patch (text/plain), 10.78 KB, created by
Gracie
on 2017-01-19 22:21:58 UTC
(
hide
)
Description:
Bug 7556 - Use "preventDoubleFormSubmit()" more in the OPAC
Filename:
MIME Type:
Creator:
Gracie
Created:
2017-01-19 22:21:58 UTC
Size:
10.78 KB
patch
obsolete
>From ded604872b691b637aad210570abff13172811e8 Mon Sep 17 00:00:00 2001 >From: Grace McKenzie <grace.mcky@gmail.com> >Date: Thu, 19 Jan 2017 22:19:02 +0000 >Subject: [PATCH] Bug 7556 - Use "preventDoubleFormSubmit()" more in the OPAC > >Test Plan: >- Look at commit to see file changes and then test each form making sure >you can't double submit > >This is for the OPAC side >--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt | 1 + > .../opac-tmpl/bootstrap/en/modules/opac-addbybiblionumber.tt | 8 +++++++- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt | 1 + > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-alert-subscribe.tt | 8 +++++++- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt | 1 + > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt | 1 + > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt | 3 +++ > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-downloadcart.tt | 8 +++++++- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-downloadshelf.tt | 1 + > .../opac-tmpl/bootstrap/en/modules/opac-full-serial-issues.tt | 1 + > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt | 8 +++++++- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt | 1 + > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt | 1 + > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-passwd.tt | 8 +++++++- > .../opac-tmpl/bootstrap/en/modules/opac-password-recovery.tt | 6 +++++- > 15 files changed, 51 insertions(+), 6 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt >index b46cae0..c9a63fc 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt >@@ -178,6 +178,7 @@ > [% BLOCK jsinclude %] > <script type="text/javascript"> > $( document ).ready(function() { >+ $('form').preventDoubleFormSubmit(); > > $(".paypal").on("click", function() { > window.open('https://www.paypal.com/webapps/mpp/paypal-popup','WIPaypal','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=1060, height=700'); >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-addbybiblionumber.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-addbybiblionumber.tt >index 164c750..9984fd3 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-addbybiblionumber.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-addbybiblionumber.tt >@@ -113,4 +113,10 @@ > </div> <!-- / .main --> > > [% INCLUDE 'opac-bottom.inc' is_popup=1 %] >-[% BLOCK jsinclude %][% END %] >+[% BLOCK jsinclude %] >+ <script type="text/javascript"> >+ $(document).ready(function() { >+ $('form').preventDoubleFormSubmit(); >+ }); >+ </script> >+[% END %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt >index 94963c4..d1887ad 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt >@@ -399,6 +399,7 @@ > <script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/plugins/jquery.cookie.min.js"></script> > <script type="text/javascript">//<![CDATA[ > $(document).ready(function() { >+ $('form').preventDoubleFormSubmit(); > $('#advsearches').tabs(); > jQuery.cookie.json = true; > //$('#advsearches > ul').tabs(); >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-alert-subscribe.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-alert-subscribe.tt >index d4b79c5..2c482eb 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-alert-subscribe.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-alert-subscribe.tt >@@ -53,4 +53,10 @@ > </div> <!-- / .main --> > > [% INCLUDE 'opac-bottom.inc' %] >-[% BLOCK jsinclude %][% END %] >+[% BLOCK jsinclude %] >+ <script type="text/javascript"> >+ $(document).ready(function() { >+ $('form').preventDoubleFormSubmit(); >+ }); >+ </script> >+[% END %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt >index 6d941bf..2eff70a 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt >@@ -203,6 +203,7 @@ > //<![CDATA[ > // Hide circular 'Log in to Your Account' link in opac-auth.pl > $(document).ready(function() { >+ $('form').preventDoubleFormSubmit(); > if ( $("#auth" ) ) { $("#members ul li a").hide(); } > }); > //]]> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt >index fa7e496..a4b7d43 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt >@@ -314,6 +314,7 @@ > <script type="text/javascript"> > //<![CDATA[ > $(document).ready(function(){ >+ $('form').preventDoubleFormSubmit(); > print(); > location.href="/cgi-bin/koha/opac-basket.pl?bib_list=[% bib_list %][% IF ( verbose ) %]&verbose=1[% END %]"; > }); >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >index e4fb61f..fe7cf32 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >@@ -1335,6 +1335,9 @@ > [% INCLUDE 'datatables.inc' %] > [% IF ( SocialNetworks ) %] > <script type="text/javascript" src="https://apis.google.com/js/plusone.js"> >+ $(document).ready(function() { >+ $('form').preventDoubleFormSubmit(); >+ } > //<![CDATA[ > {lang: '[% lang %]'} > //]]> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-downloadcart.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-downloadcart.tt >index f7eebd8..9e5d5fc 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-downloadcart.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-downloadcart.tt >@@ -34,4 +34,10 @@ > </div> <!-- / .container-fluid --> > </div> <!-- / .main --> > [% INCLUDE 'opac-bottom.inc' is_popup=1 %] >-[% BLOCK jsinclude %][% END %] >+[% BLOCK jsinclude %] >+ <script type="text/javascript"> >+ $(document).ready(function() { >+ $('form').preventDoubleFormSubmit(); >+ }); >+ </script> >+[% END %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-downloadshelf.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-downloadshelf.tt >index 7824f31..24e4544 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-downloadshelf.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-downloadshelf.tt >@@ -107,6 +107,7 @@ > <script type="text/javascript"> > //<![CDATA[ > $(document).ready(function(){ >+ $('form').preventDoubleFormSubmit(); > $("#userdownloadshelf form").on("submit",function(e){ > if( $("#dlformat").val() == "" ){ > e.preventDefault(); >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-full-serial-issues.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-full-serial-issues.tt >index d538e55..946cb34 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-full-serial-issues.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-full-serial-issues.tt >@@ -140,6 +140,7 @@ > <script type="text/javascript"> > //<![CDATA[ > $(document).ready(function(){ >+ $('form').preventDoubleFormSubmit(); > showlayer([% yearmin %]); > $("a.tabsubs:first").addClass("currentsubtab"); > $("#filterform").submit(function(){ >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt >index 42f1e52..0c834c7 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt >@@ -113,4 +113,10 @@ > </div> <!-- /.main --> > > [% INCLUDE 'opac-bottom.inc' %] >-[% BLOCK jsinclude %][% END %] >+[% BLOCK jsinclude %] >+ <script type+"text/javascript"> >+ $(document).ready(function() { >+ $('form').preventDoubleFormSubmit(); >+ }); >+ </script> >+[% END %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt >index 53401b9..02b9165 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt >@@ -948,6 +948,7 @@ > <script type="text/javascript"> > //<![CDATA[ > $(document).ready(function() { >+ $('form').preventDoubleFormSubmit(); > [% IF action == 'edit' && !OPACPatronDetails %] > $("#memberentry-form :input").attr('readonly', true); > $("#borrower_branchcode").attr('disabled',true); >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt >index 84cb228..54fb7bb 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt >@@ -163,6 +163,7 @@ > [% BLOCK jsinclude %] > <script type="text/javascript">//<![CDATA[ > $(document).ready(function(){ >+ $('form').preventDoubleFormSubmit(); > $(".none").click(function(){ > if($(this).attr("checked")){ > var rowid = $(this).attr("id"); >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-passwd.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-passwd.tt >index f2766c9..20dbf9e 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-passwd.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-passwd.tt >@@ -80,4 +80,10 @@ > > > [% INCLUDE 'opac-bottom.inc' %] >-[% BLOCK jsinclude %][% END %] >+[% BLOCK jsinclude %] >+<script type="text/javascript"> >+ $(document).ready(function() { >+ $('form').preventDoubleFormSubmit(); >+ }); >+</script> >+[% END %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-password-recovery.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-password-recovery.tt >index 9d27b4b..c84839c 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-password-recovery.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-password-recovery.tt >@@ -5,7 +5,11 @@ > [% BLOCK cssinclude %][% END %] > [% BLOCK jsinclude %] > <script type="text/javascript" language="javascript"> >- $(function() { >+ $(document).ready(function() { >+ $('form').preventDoubleFormSubmit(); >+ }); >+ >+$(function() { > $("#CheckAll").click(function(){ > $("[name=deleteRequest]").attr('checked', true); > return false; >-- >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 7556
: 59289 |
59290