@@ -41,7 +41,7 class Redmine::Views::LabelledFormBuilder < ActionView::Helpers::FormBuilder | |||
|
41 | 41 | text ||= l(("field_" + field.to_s.gsub(/\_id$/, "")).to_sym) |
|
42 | 42 | text += @template.content_tag("span", " *", :class => "required") if options.delete(:required) |
|
43 | 43 | @template.content_tag("label", text.html_safe, |
|
44 | :class => (@object && @object.errors[field] ? "error" : nil), | |
|
44 | :class => (@object && @object.errors[field].present? ? "error" : nil), | |
|
45 | 45 | :for => (@object_name.to_s + "_" + field.to_s)) |
|
46 | 46 | end |
|
47 | 47 | end |
General Comments 0
You need to be logged in to leave comments.
Login now