Feature #2464
closed
Add placeholder "h:mm" to hours field for better user guidance
Added by Maxim Krušina over 15 years ago.
Updated 11 days ago.
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
+1 I agree, I get a lot of "bug" reports from people entering time incorrectly
is this needed anymore? imho no.
- Description updated (diff)
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
![](/attachments/download/32762/clipboard-202408191639-tajgz.png)
- Target version changed from Candidate for next major release to 6.0.0
Setting the target version to 6.0.0.
- Subject changed from Add textual help to "spent time" field and fix errors to Add placeholder "h:mm" to hours field for better user guidance
- Status changed from New to Closed
- Assignee set to Go MAEDA
- Resolution set to Fixed
Committed the patch in r22977.
Also available in: Atom
PDF