rework fixing collection_check_box labels

pull/2612/head
Jens Ulferts 10 years ago
parent 6252fec2dc
commit 6e00f1d82f
  1. 4
      app/views/projects/form/_modules.html.erb
  2. 2
      lib/tabular_form_builder.rb

@ -45,9 +45,7 @@ See doc/COPYRIGHT.rdoc for more details.
<%= form.collection_check_box :enabled_module_names, <%= form.collection_check_box :enabled_module_names,
name, name,
@project.module_enabled?(name), @project.module_enabled?(name),
l_or_humanize(name, :prefix => "project_module_"), l_or_humanize(name, :prefix => "project_module_") %>
prefix: 'project_'
%>
</div> </div>
<% end %> <% end %>

@ -72,7 +72,7 @@ class TabularFormBuilder < ActionView::Helpers::FormBuilder
text = field.to_s + "_#{value}", text = field.to_s + "_#{value}",
options = {}) options = {})
label_for = "#{options[:prefix] || ''}#{field}_#{value}".to_sym label_for = "#{object_name}_#{field}_#{value}".to_sym
input_options = options.reverse_merge(multiple: true, input_options = options.reverse_merge(multiple: true,
checked: checked, checked: checked,

Loading…
Cancel
Save