Bugzilla – Attachment 181245 Details for
Bug 39664
Repeatable AV additional fields no longer work
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39664: Fix selection of repeatable additional fields linked with AV
Bug-39664-Fix-selection-of-repeatable-additional-f.patch (text/plain), 5.07 KB, created by
Jonathan Druart
on 2025-04-22 11:14:44 UTC
(
hide
)
Description:
Bug 39664: Fix selection of repeatable additional fields linked with AV
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-04-22 11:14:44 UTC
Size:
5.07 KB
patch
obsolete
>From 1c15205d4d335f524d8932ef5024438005908a7e Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >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 %] >- <option value="[% av.authorised_value | html %]" selected="selected">[% av.lib | html %]</option> >- [% ELSE %] >- <option value="[% av.authorised_value | html %]">[% av.lib | html %]</option> >- [% END %] >+ [% IF av.authorised_value == values.${field.id}.0 %] >+ <option value="[% av.authorised_value | html %]" selected="selected">[% av.lib | html %]</option> > [% ELSE %] >- [% SET av_field_value_rendered = 0 %] >- [% FOR value IN values.${field.id} %] >- [% IF av.authorised_value == value %] >- <label class="radio"> >- <input type="checkbox" id="additional_field_[% field.id | html %]" checked name="additional_field_[% field.id | html %]" value="[% av.authorised_value | html %]" />[% av.lib | html %] >- </label> >- [% SET av_field_value_rendered = 1 %] >- [% END %] >- [% END %] >- [% IF !av_field_value_rendered %] >- <label class="radio"> >- <input type="checkbox" id="additional_field_[% field.id | html %]" name="additional_field_[% field.id | html %]" value="[% av.authorised_value | html %]" />[% av.lib | html %] >- </label> >- [% END %] >+ <option value="[% av.authorised_value | html %]">[% av.lib | html %]</option> > [% END %] > [% END %] > [% END %] > </select> >+ [% 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 %] >+ <label class="radio"> >+ <input type="checkbox" id="additional_field_[% field.id | html %]" checked name="additional_field_[% field.id | html %]" value="[% av.authorised_value | html %]" />[% av.lib | html %] >+ </label> >+ [% SET av_field_value_rendered = 1 %] >+ [% END %] >+ [% END %] >+ [% IF !av_field_value_rendered %] >+ <label class="radio"> <input type="checkbox" id="additional_field_[% field.id | html %]" name="additional_field_[% field.id | html %]" value="[% av.authorised_value | html %]" />[% av.lib | html %] </label> >+ [% END %] >+ [% END %] > [% END %] > [% IF !search_form %] > <span>(Authorised values for [% authorised_value_category | html %])</span> >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 39664
:
181245
|
181260
|
181262