fix wiki features

this is fixed by extending the collection_checkbox method of the
TabularFormBuilder by a prefix-option. This is so that the labels are
properly set for the inidividual check boxes
pull/2612/head
Florian Kraft 10 years ago
parent 3023b9be22
commit 6fffb91286
No known key found for this signature in database
GPG Key ID: 786CD08D94605A9E
  1. 4
      app/views/projects/form/_modules.html.erb
  2. 2
      lib/tabular_form_builder.rb

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

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

Loading…
Cancel
Save