summaryrefslogtreecommitdiffstats
path: root/app/helpers
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2014-07-05 09:59:17 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2014-07-05 09:59:17 +0000
commitb91cbcaa0382362688c59eb192bce46508956f7b (patch)
treebba9fe7728dac151139f3012673016f867a2e81b /app/helpers
parent0125ba14f6b0c7ff907c8bcadb1cfdf61ed9b157 (diff)
downloadredmine-b91cbcaa0382362688c59eb192bce46508956f7b.tar.gz
redmine-b91cbcaa0382362688c59eb192bce46508956f7b.zip
Option to render boolean custom fields as a single check box or radio buttons (#17003).
git-svn-id: http://svn.redmine.org/redmine/trunk@13216 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/custom_fields_helper.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/helpers/custom_fields_helper.rb b/app/helpers/custom_fields_helper.rb
index 173e0d5f8..5153c1489 100644
--- a/app/helpers/custom_fields_helper.rb
+++ b/app/helpers/custom_fields_helper.rb
@@ -138,7 +138,11 @@ module CustomFieldsHelper
end unless custom_values.empty?
end
- def edit_tag_style_tag(form)
- form.select :edit_tag_style, [[l(:label_drop_down_list), ''], [l(:label_checkboxes), 'check_box']], :label => :label_display
+ def edit_tag_style_tag(form, options={})
+ select_options = [[l(:label_drop_down_list), ''], [l(:label_checkboxes), 'check_box']]
+ if options[:include_radio]
+ select_options << [l(:label_radio_buttons), 'radio']
+ end
+ form.select :edit_tag_style, select_options, :label => :label_display
end
end