From 3dd81c877c504cbebafff8f18a0808cefca4109f Mon Sep 17 00:00:00 2001 From: Alex Arnaud Date: Tue, 10 Oct 2017 15:21:35 +0000 Subject: [PATCH] Bug 19443 - wrong HTML in patron creation page (members/memberentry.pl) The form provided on top of the page if Koha find a duplicate patron is not closed. This cause some trouble. Test plan: - Edit the syspref IntranetUserJS and type the following code: "$(document).ready(function() { $("#memberentry_library_management").insertBefore("#memberentry_identity"); });" - create a patron so that Koha will warn you about a duplicate one, - click on "Not a duplicate. Save as new record", - you should get error(s) about empty field(s). Note that now, the library management part's fields are empty or reset to default --- .../prog/en/modules/members/memberentrygen.tt | 30 ++++++++++++---------- 1 file changed, 17 insertions(+), 13 deletions(-) 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 091486e..a29a370 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -76,6 +76,16 @@ $(document).ready(function() { } }); + $('#duplicate').on('click', function() { + $("input[name='op']").val('modify'); + $("input[name='borrowernumber']").val('[% check_member %]'); + $('#entryform').submit(); + }); + + $('#not-duplicate').on('click', function() { + $("input[name='nodouble']").val('1'); + $('#entryform').submit(); + }); }); var MSG_SEPARATOR = _("Separator must be / in field %s"); @@ -138,18 +148,10 @@ $(document).ready(function() {

Duplicate patron record?

View existing record

-
- - - - -
+ -
- - -
[% END %] @@ -222,8 +224,10 @@ $(document).ready(function() { [% END %] -[% UNLESS ( check_member ) %] - [% END %] + +[% UNLESS ( check_member ) %] + +[% END %] -- 2.7.4