From b7a0322258ad534ea8e5af34cb0581b0b5f174e8 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 11 May 2016 12:00:01 +0100 Subject: [PATCH] Bug 16458: Update library when a guarantor is set MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit If you edit a patron from the Edit link of the patron information block (step 1 of the memberentry script), the branchcode is not displayed. If you set a guarantor to a child from this form, a JavaScript error will be raised: JavaScript error form.branchcode is undefined It happens because there is the branchcode is not displayed and there is no element with a branchcode name. To avoid this issue, a branchcode hidden input is added to the form and it will be updated when a guarantor is selected (same behavior as when you edit a patron using the complete form). Test plan: Edit a patron using the Edit link of the patron info block (not the Edit button in the toolbar) Set a guarantor => Notice that the branchcode of the patron has been updated with the branchcode of the guarantor Signed-off-by: Owen Leonard Signed-off-by: Marcel de Rooy Signed-off-by: Brendan Gallagher (cherry picked from commit fc35a5099f613c08d12be1d67fd027d4a5eaf99c) Signed-off-by: Frédéric Demians --- .../intranet-tmpl/prog/en/modules/members/memberentrygen.tt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 aa1de3e688..5abb6e4a7f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -289,7 +289,11 @@ $(document).ready(function() { [% END # hide fieldset %] -[% IF ( showguarantor ) %] +[% IF ( showguarantor ) %] + + [% UNLESS step_6 %] + + [% END %]
Guarantor information
    -- 2.39.5