Bugzilla – Attachment 49175 Details for
Bug 16066
JavaScript error on new patron form when duplicate is suspected
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16066 - JavaScript error on new patron form when duplicate is suspected
Bug-16066---JavaScript-error-on-new-patron-form-wh.patch (text/plain), 3.53 KB, created by
Jonathan Druart
on 2016-03-15 15:11:43 UTC
(
hide
)
Description:
Bug 16066 - JavaScript error on new patron form when duplicate is suspected
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-03-15 15:11:43 UTC
Size:
3.53 KB
patch
obsolete
>From c4c8fbca551ae7676b46f453280713bf4d7558da Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 14 Mar 2016 11:36:19 -0400 >Subject: [PATCH] Bug 16066 - JavaScript error on new patron form when > duplicate is suspected >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >When a new patron is submitted which is suspected to be a duplicate, the >entry form is redisplayed with a new name attribute, "form_nodouble." >Other scripts on the page still look for a form named "form," so there >is an error. > >This patch removes the use of "form_nodouble" on the assumption that it >is unnecessary to name the form something different when a duplicate is >suspected. All the same validation scripts should be run on the form >either way. > >To test, apply the patch and clear your cache if necessary. > >- Go to Patrons -> New patron and add a patron which matches an existing > one in order to trigger the duplicate warning. >- Confirm that Firebug (or similar) is not reporting a JavaScript error. >- Confirm that the 'Edit existing' and 'Save as new' buttons work > correctly. > >Reproduced JavaScript error and verified that it no longer appears with >this patch. >Signed-off-by: Marc Véron <veron@veron.ch> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > koha-tmpl/intranet-tmpl/prog/en/js/members.js | 6 +++--- > koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt | 2 +- > 2 files changed, 4 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/members.js b/koha-tmpl/intranet-tmpl/prog/en/js/members.js >index 7f7955a..2acefb6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/js/members.js >+++ b/koha-tmpl/intranet-tmpl/prog/en/js/members.js >@@ -95,8 +95,8 @@ function check_form_borrowers(nav){ > var message_champ=""; > if (document.form.check_member.value == 1 ) > { >- if (document.form_double.answernodouble) { >- if( (!(document.form_double.answernodouble.checked))){ >+ if (document.form.answernodouble) { >+ if( (!(document.form.answernodouble.checked))){ > document.form.nodouble.value=0; > } else { > document.form.nodouble.value=1; >@@ -119,7 +119,7 @@ function check_form_borrowers(nav){ > > //patrons form to test if you checked no to the question of double > if (statut!=1 && document.form.check_member.value > 0 ) { >- if (!(document.form_double.answernodouble.checked)){ >+ if (!(document.form.answernodouble.checked)){ > message_champ+= MSG_DUPLICATE_SUSPICION; > statut=1; > document.form.nodouble.value=0; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >index d470166..9d23c44 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >@@ -213,7 +213,7 @@ function select_user(borrowernumber, borrower) { > <input class="edit" type="submit" value="It is a duplicate. Edit existing record" /> > </form> > >- <form name="form_double" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off"> >+ <form name="form" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off"> > <input type="hidden" name="nodouble" value="1" /> > <input class="new" type="submit" value="Not a duplicate. Save as new record" /> > </div> >-- >2.7.0
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 16066
:
49111
|
49113
| 49175