Bug 23681: (QA follow-up) Fix memberentry page display
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Mon, 4 Jul 2022 14:13:35 +0000 (15:13 +0100)
committerTomas Cohen Arazi <tomascohen@theke.io>
Thu, 25 Aug 2022 11:41:07 +0000 (08:41 -0300)
We were missing some changes to the restriction types dropdown handling
in the memberentry template.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt

index f10ae9c..2988157 100644 (file)
@@ -8,6 +8,7 @@
 [% PROCESS 'member-main-address-style.inc' %]
 [% PROCESS 'member-alt-address-style.inc' %]
 [% PROCESS 'member-alt-contact-style.inc' %]
+[% PROCESS 'patron_restrictions.inc' %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
     <title>
@@ -1402,8 +1403,12 @@ legend:hover {
                                                         <label for="debarred_type">Type:</label>
                                                         <select name="debarred_type">
                                                             [% FOREACH code IN restriction_types.keys %]
-                                                                [% IF restriction_types.$code.can_be_added_manually %]
-                                                                    <option value="[% code | html %]">[% restriction_types.$code.display_text | html %]</option>
+                                                                [% IF !restriction_types.$code.is_system %]
+                                                                    [% IF restriction_types.$code.is_default %]
+                                                                    <option value="[% code | html %]" selected>[% PROCESS restriction_type_description restriction=restriction_types.$code %]</option>
+                                                                    [% ELSE %]
+                                                                    <option value="[% code | html %]">[% PROCESS restriction_type_description restriction=restriction_types.$code %]</option>
+                                                                    [% END %]
                                                                 [% END %]
                                                             [% END %]
                                                         </select>