@@ -45,7 +45,7 class Redmine::Views::LabelledFormBuilder < ActionView::Helpers::FormBuilder | |||
|
45 | 45 | # A field for entering hours value |
|
46 | 46 | def hours_field(field, options={}) |
|
47 | 47 | # display the value before type cast when the entered value is not valid |
|
48 |
if @object.errors |
|
|
48 | if @object.errors.get(field).blank? | |
|
49 | 49 | options = options.merge(:value => format_hours(@object.send field)) |
|
50 | 50 | end |
|
51 | 51 | text_field field, options |
General Comments 0
You need to be logged in to leave comments.
Login now