diff --git a/app/helpers/custom_fields_helper.rb b/app/helpers/custom_fields_helper.rb index 47dc33e963..6c0843800b 100644 --- a/app/helpers/custom_fields_helper.rb +++ b/app/helpers/custom_fields_helper.rb @@ -91,6 +91,14 @@ module CustomFieldsHelper lang: custom_value.custom_field.name_locale end + def hidden_custom_field_label_tag(name, custom_value) + content_tag 'label', h(custom_value.custom_field.name) + + (custom_value.custom_field.is_required? ? content_tag('span', ' *', class: 'required') : ''), + for: "#{name}_custom_field_values_#{custom_value.custom_field.id}", + class: "hidden-for-sighted", + lang: custom_value.custom_field.name_locale + end + def blank_custom_field_label_tag(name, custom_field) content_tag 'label', h(custom_field.name) + (custom_field.is_required? ? content_tag('span', ' *', class: 'required') : ''), diff --git a/app/views/projects/form/_activities.html.erb b/app/views/projects/form/_activities.html.erb index dc08513cf1..05a534ac19 100644 --- a/app/views/projects/form/_activities.html.erb +++ b/app/views/projects/form/_activities.html.erb @@ -97,6 +97,7 @@ See doc/COPYRIGHT.rdoc for more details. <%= checked_image !enumeration.project %> <% enumeration.custom_field_values.each do |value| %> + <%= hidden_custom_field_label_tag "enumerations[#{enumeration.id}]", value %> <%= custom_field_tag "enumerations[#{enumeration.id}]", value %> <% end %>