From 27fca7aceb91124c037bb3545c351d3cf185e7bf 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 Signed-off-by: Owen Leonard Signed-off-by: Kyle M Hall Signed-off-by: Jonathan Druart --- .../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 6d8ddc0142..b8637831ee 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -91,6 +91,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"); @@ -151,18 +161,10 @@ $(document).ready(function() {

Duplicate patron record?

View existing record

-
- - - - -
+ -
- - -
[% END %] @@ -241,8 +243,10 @@ $(document).ready(function() { [% END %] -[% UNLESS ( check_member ) %] - [% END %] + +[% UNLESS ( check_member ) %] + +[% END %] -- 2.39.5