Bug 21080: Fix patron's attributes display when PA_CLASS is used
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 29 Oct 2018 22:23:53 +0000 (19:23 -0300)
committerNick Clemens <nick@bywatersolutions.com>
Wed, 31 Oct 2018 13:31:01 +0000 (13:31 +0000)
When a patron attribute class (AV PA_CLASS) is created, the patron's
edit view is broken:
https://screenshots.firefox.com/62uNhoUtH6rPXm9l/pro.kohadev.org

To recreate:
1. Create 1+ authorised values PA_CLASS
2. Create patron's attributes using it
3. Edit a patron

it depends on the order of the fieldset and the ol elements

This is certainly not the best fix but the display does not look broken!

Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt

index be03649..e72944e 100644 (file)
     <legend id="patron_attributes_lgd">Additional attributes and identifiers</legend>
     <input type="hidden" name="setting_extended_patron_attributes" value="1" />
     [% FOREACH pa_loo IN patron_attributes %]
-        [% IF pa_loo.class %]
-            <fieldset id="aai_[% pa_loo.class | html %]">
-            <legend id="[% pa_loo.class | html %]_lgd">[% pa_loo.lib | html %]</legend>
-        [% END %]
         <ol class="attributes_table">
+            [% IF pa_loo.class %]
+                <fieldset id="aai_[% pa_loo.class | html %]">
+                <legend id="[% pa_loo.class | html %]_lgd">[% pa_loo.lib | html %]</legend>
+            [% END %]
             [% FOREACH patron_attribute IN pa_loo.items %]
                 <li data-category_code="[% patron_attribute.category_code | html %]">
                     <label for="[% patron_attribute.form_id | html %]">[% patron_attribute.description | html %]: </label>
                         [% END %]
                 </li>
             [% END %]
+            [% IF pa_loo.class %]</fieldset>[% END %]
         </ol>
-        [% IF pa_loo.class %]</fieldset>[% END %]
     [% END %]
   </fieldset>
 [% END %][% END %][% END %]