From 1c15205d4d335f524d8932ef5024438005908a7e Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 22 Apr 2025 13:12:43 +0200 Subject: [PATCH] Bug 39664: Fix selection of repeatable additional fields linked with AV Move the radio buttons outside of the select. Caused by commit ba31ec291f5cbb6a0a8edd7e66934127a3f6a8a3 Bug 38714: additional-fields-entry.inc To test: 1) Add an AV 'repeatable' additional field for libraries, at: http://localhost:8081/cgi-bin/koha/admin/additional-fields.pl?tablename=branches 2) Edit a library. Notice no options show. 3) Revert additional-fields-entry.inc to how it was previous to the commit. Hard refresh the edit library page. Notice the options show. --- .../en/includes/additional-fields-entry.inc | 38 +++++++++---------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/additional-fields-entry.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/additional-fields-entry.inc index 8a1d6838105..9d2f47e2c04 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/additional-fields-entry.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/additional-fields-entry.inc @@ -53,31 +53,29 @@ [% END %] [% ELSE %] [% FOREACH av IN AuthorisedValues.GetAuthValueDropbox( authorised_value_category ) %] - [% IF !field.repeatable %] - [% IF av.authorised_value == values.${field.id}.0 %] - - [% ELSE %] - - [% END %] + [% IF av.authorised_value == values.${field.id}.0 %] + [% ELSE %] - [% SET av_field_value_rendered = 0 %] - [% FOR value IN values.${field.id} %] - [% IF av.authorised_value == value %] - - [% SET av_field_value_rendered = 1 %] - [% END %] - [% END %] - [% IF !av_field_value_rendered %] - - [% END %] + [% END %] [% END %] [% END %] + [% ELSE %] + [% FOREACH av IN AuthorisedValues.GetAuthValueDropbox( authorised_value_category ) %] + [% SET av_field_value_rendered = 0 %] + [% FOR value IN values.${field.id} %] + [% IF av.authorised_value == value %] + + [% SET av_field_value_rendered = 1 %] + [% END %] + [% END %] + [% IF !av_field_value_rendered %] + + [% END %] + [% END %] [% END %] [% IF !search_form %] (Authorised values for [% authorised_value_category | html %]) -- 2.34.1