Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Show name but disable it

Oliver Günther68840dcde2fb
diff --git a/app/helpers/settings_helper.rb b/app/helpers/settings_helper.rb
index e41c72800a7..cb1f8891580 100644
--- a/app/helpers/settings_helper.rb
+++ b/app/helpers/settings_helper.rb
@@ -80,11 +80,12 @@ module SettingsHelper
content_tag(:span, class: 'form--field-container -vertical') do
hidden_field_tag("settings[#{setting}][]", '') +
choices.map do |choice|
- text, value = (choice.is_a?(Array) ? choice : [choice, choice])
+ text, value, choice_options = (choice.is_a?(Array) ? choice : [choice, choice])
+ choice_options = (choice_options || {}).merge(options.except(:id))
content_tag(:label, class: 'form--label-with-check-box') do
styled_check_box_tag("settings[#{setting}][]", value,
- Setting.send(setting).include?(value), options.merge(id: nil)) + text.to_s
+ Setting.send(setting).include?(value), choice_options) + text.to_s
end
end.join.html_safe
end