Actions
Feature #2464
closedAdd placeholder "h:mm" to hours field for better user guidance
Start date:
2009-01-08
Due date:
% Done:
0%
Estimated time:
Resolution:
Fixed
Description
It will be very hardy to have some short pop-up help near "Spent-time" box.
It's hard to remember exact format of time.
Files
Updated by Eric Davis almost 16 years ago
- Category set to UI
+1 I agree, I get a lot of "bug" reports from people entering time incorrectly
Updated by Go MAEDA 4 months ago
- File clipboard-202408191639-tajgz.png clipboard-202408191639-tajgz.png added
- Target version set to Candidate for next major release
I would like to propose adding a placeholder of "h:mm" in the hours field to indicate the expected time format. While Redmine supports various time entry formats, “h:mm” is certainly the most common. Displaying this format as a placeholder could help users understand the expected input more easily and improve overall usability.
This can be implemented with the following change:
diff --git a/lib/redmine/views/labelled_form_builder.rb b/lib/redmine/views/labelled_form_builder.rb
index 8c97b8215..f364ca8e2 100644
--- a/lib/redmine/views/labelled_form_builder.rb
+++ b/lib/redmine/views/labelled_form_builder.rb
@@ -49,6 +49,7 @@ class Redmine::Views::LabelledFormBuilder < ActionView::Helpers::FormBuilder
# display the value before type cast when the entered value is not valid
if @object.errors[field].blank?
options = options.merge(:value => format_hours(@object.send field))
+ .with_defaults(:placeholder => 'h:mm')
end
text_field field, options
end
Actions