diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2012-05-04 14:33:35 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2012-05-04 14:33:35 +0000 |
commit | ad8193dcdedadf145814734781755e826cef03ec (patch) | |
tree | 1850ec4458885dca70da2d54fe7b0ad07b38638c /lib/redmine/views/labelled_form_builder.rb | |
parent | b4350ca91abef0a031e89984bf17fa55e3db0b86 (diff) | |
download | redmine-ad8193dcdedadf145814734781755e826cef03ec.tar.gz redmine-ad8193dcdedadf145814734781755e826cef03ec.zip |
fix label_for_field of LabelledFormBuilder always has class="error" in label tag
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9618 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/views/labelled_form_builder.rb')
-rw-r--r-- | lib/redmine/views/labelled_form_builder.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/redmine/views/labelled_form_builder.rb b/lib/redmine/views/labelled_form_builder.rb index bdf5ffb11..e802737cd 100644 --- a/lib/redmine/views/labelled_form_builder.rb +++ b/lib/redmine/views/labelled_form_builder.rb @@ -41,7 +41,7 @@ class Redmine::Views::LabelledFormBuilder < ActionView::Helpers::FormBuilder text ||= l(("field_" + field.to_s.gsub(/\_id$/, "")).to_sym) text += @template.content_tag("span", " *", :class => "required") if options.delete(:required) @template.content_tag("label", text.html_safe, - :class => (@object && @object.errors[field] ? "error" : nil), + :class => (@object && @object.errors[field].present? ? "error" : nil), :for => (@object_name.to_s + "_" + field.to_s)) end end |