Use content_tag helper.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9682 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2012-05-13 08:47:54 +00:00
parent 69e55fb1ef
commit 478a549356
1 changed files with 3 additions and 3 deletions

View File

@ -55,13 +55,13 @@ module CustomFieldsHelper
unless custom_field.multiple?
if custom_field.is_required?
unless custom_field.default_value.present?
blank_option = "<option value=\"\">--- #{l(:actionview_instancetag_blank_option)} ---</option>"
blank_option = content_tag('option', "--- #{l(:actionview_instancetag_blank_option)} ---", :value => '')
end
else
blank_option = '<option></option>'
blank_option = content_tag('option')
end
end
s = select_tag(field_name, blank_option.html_safe + options_for_select(custom_field.possible_values_options(custom_value.customized), custom_value.value),
s = select_tag(field_name, blank_option + options_for_select(custom_field.possible_values_options(custom_value.customized), custom_value.value),
tag_options.merge(:multiple => custom_field.multiple?))
if custom_field.multiple?
s << hidden_field_tag(field_name, '')