From 75ace5c608ebeb99ec282438f3b5cad570e7514d Mon Sep 17 00:00:00 2001 From: Nick Clemens <nick@bywatersolutions.com> Date: Fri, 12 May 2017 10:00:29 -0400 Subject: [PATCH] Bug 18597 - Quick add form does not transfer patron attributes values when switching forms/saving The function that switches between quick add/fulll form assumes labels are followed by values - patron_attr don't follow this pattern. This patch just moves the hidden input field To test: 1 - Have some patron attributes (with/without auth values set) 2 - Add them to QuickAddFields (patron_attr2 for example) 3 - view quick add form and set some values 4 - Switch to full form, values not transferred 5 - Switch to quick add, view values, save 6 - Values are not saved :-( 7 - Apply patch 8 - Repeat 3 - 5 9 - Values are transferred and saved :-) Signed-off-by: Peggy Thrasher <p.thrasher@dover.nh.gov> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt | 2 +- 1 file changed, 1 insertion(+), 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 3221b4acb3..5045714672 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -1107,7 +1107,6 @@ $(document).ready(function() { [% FOREACH patron_attribute IN pa_loo.items %] <li data-category_code="[% patron_attribute.category_code %]"> <label for="[% patron_attribute.form_id %]">[% patron_attribute.description %]: </label> - <input type="hidden" id="[% patron_attribute.form_id %]_code" name="[% patron_attribute.form_id %]_code" value="[% patron_attribute.code |html %]" /> [% IF ( patron_attribute.use_dropdown ) %] <select id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]"> <option value=""></option> @@ -1126,6 +1125,7 @@ $(document).ready(function() { [% ELSE %] <textarea rows="2" cols="30" id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]">[% patron_attribute.value %]</textarea> [% END %] + <input type="hidden" id="[% patron_attribute.form_id %]_code" name="[% patron_attribute.form_id %]_code" value="[% patron_attribute.code |html %]" /> <a href="#" onclick="clear_entry(this); return false;"><i class="fa fa-fw fa-trash"></i> Clear</a> [% IF ( patron_attribute.repeatable ) %] <a href="#" onclick="clone_entry(this); return false;"><i class="fa fa-fw fa-plus"></i> New</a> -- 2.11.0