Browse Source

Use content_tag helper.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9682 e93f8b46-1217-0410-a6f0-8f06a7374b81
tags/2.0.0
Jean-Philippe Lang 12 years ago
parent
commit
478a549356
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      app/helpers/custom_fields_helper.rb

+ 3
- 3
app/helpers/custom_fields_helper.rb 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, '')

Loading…
Cancel
Save