Add labels to customfields inside activities table on settings

pull/3963/head
Magdalena Kafka 9 years ago
parent 29e2e779c1
commit 3f0f1668c7
  1. 8
      app/helpers/custom_fields_helper.rb
  2. 1
      app/views/projects/form/_activities.html.erb

@ -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') : ''),

@ -97,6 +97,7 @@ See doc/COPYRIGHT.rdoc for more details.
<td><%= checked_image !enumeration.project %></td>
<% enumeration.custom_field_values.each do |value| %>
<td>
<%= hidden_custom_field_label_tag "enumerations[#{enumeration.id}]", value %>
<%= custom_field_tag "enumerations[#{enumeration.id}]", value %>
</td>
<% end %>

Loading…
Cancel
Save