no need for struct with options_for_select

This commit is contained in:
Alexander Meindl 2018-09-10 18:01:04 +02:00
parent 4318d3a731
commit f72e624a72

View File

@ -10,11 +10,12 @@ p
= l(:project_overview_content_info)
p
- disabled_modules = Struct.new(:id, :name)
= content_tag(:label, l(:label_disabled_modules))
= select_tag('settings[disabled_modules]',
options_from_collection_for_select(Redmine::AccessControl.available_project_modules_all.collect { |m| disabled_modules.new(m, l_or_humanize(m, prefix: 'project_module_').to_s) },
:id, :name, @settings[:disabled_modules]),
options_for_select(Redmine::AccessControl.available_project_modules_all \
.collect { |m| [l_or_humanize(m, prefix: 'project_module_'), m] },
@settings[:disabled_modules]),
multiple: true, style: 'height: 300px;')
em.info
= l(:disabled_modules_info)