Bugzilla – Attachment 49113 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.45 KB, created by
Marc Véron
on 2016-03-14 16:10:41 UTC
(
hide
)
Description:
Bug 16066 - JavaScript error on new patron form when duplicate is suspected
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2016-03-14 16:10:41 UTC
Size:
3.45 KB
patch
obsolete
>From cc4dfedf10e5426dc668e395afeb003f94ae621f 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> >--- > koha-tmpl/intranet-tmpl/prog/en/js/members.js | 6 +++--- > .../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 3a8f7c3..05153a9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >@@ -214,7 +214,7 @@ function select_user(borrowernumber, borrower) { > Edit existing record</button> > </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" /> > <button type="submit" class="new"><i class="fa fa-plus"></i> Not a duplicate. > Save as new record</button> >-- >1.7.10.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 16066
:
49111
|
49113
|
49175