Bug 16066 - JavaScript error on new patron form when duplicate is suspected
authorOwen Leonard <oleonard@myacpl.org>
Mon, 14 Mar 2016 15:36:19 +0000 (11:36 -0400)
committerBrendan Gallagher <brendan@bywatersolutions.com>
Mon, 21 Mar 2016 21:33:49 +0000 (21:33 +0000)
commit101ba17685513364f80ec574cabd144d81570ddc
treec9e76ce8dc84e0f47fb497077689c3d797ba603b
parentfbcc350e9176a1da3fe839240502909d745a2b31
Bug 16066 - JavaScript error on new patron form when duplicate is suspected

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>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
koha-tmpl/intranet-tmpl/prog/en/js/members.js
koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt