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