OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Add required marks and labels
Klaus Zanders0516c3cc6866
diff --git a/modules/costs/app/components/time_entries/time_entry_form.rb b/modules/costs/app/components/time_entries/time_entry_form.rbindex 4f1014e47e1..f5b679fa047 100644--- a/modules/costs/app/components/time_entries/time_entry_form.rb+++ b/modules/costs/app/components/time_entries/time_entry_form.rb@@ -6,6 +6,7 @@ module TimeEntriesf.autocompleter(name: :user_id,label: TimeEntry.human_attribute_name(:user),+ required: true,autocomplete_options: {defaultData: true,component: "opce-user-autocompleter",@@ -26,30 +27,36 @@ module TimeEntries# https://github.com/opf/openproject/pull/17223/commits/db765ac3862ded78139e6b8827e33cf2b8b3bce8f.text_field name: :spent_on,type: "date",- label: "Date"+ required: true,+ label: TimeEntry.human_attribute_name(:spent_on)f.group(layout: :horizontal) do |g|# TODO: Add a time picker based on the date picker linked aboveg.text_field name: :start_time,- label: "Start time",+ required: true,+ label: TimeEntry.human_attribute_name(:start_time),data: { "time-entry-target" => "startTimeInput" }g.text_field name: :end_time,- label: "Finish time",+ required: true,+ label: TimeEntry.human_attribute_name(:end_time),data: { "time-entry-target" => "endTimeInput" }endf.text_field name: :hours,- label: "Hours",+ required: true,+ label: TimeEntry.human_attribute_name(:hours),data: { "time-entry-target" => "hoursInput" }if show_work_package_field?f.work_package_autocompleter name: :work_package_id,- label: "Work package",+ label: TimeEntry.human_attribute_name(:work_package),autocomplete_options: {focusDirectly: false,append_to: "#time-entry-dialog",- filters: [{ name: "project_id", operator: "=", values: [model.project_id] }]+ filters: [+ { name: "project_id", operator: "=", values: [model.project_id] }+ ]}end@@ -60,7 +67,7 @@ module TimeEntriesendend- f.text_area name: :comments, label: "Comments"+ f.text_area name: :comments, label: TimeEntry.human_attribute_name(:comments)render_custom_fields(form: f)enddiff --git a/modules/costs/config/locales/en.yml b/modules/costs/config/locales/en.ymlindex 34a97cd6f70..f3f883f8882 100644--- a/modules/costs/config/locales/en.yml+++ b/modules/costs/config/locales/en.yml@@ -54,6 +54,17 @@ en:rate: "Rate"user:default_rates: "Default rates"+ time_entry:+ project: Project+ user: User+ work_package: Work package+ hours: Hours+ comments: Comment+ activity: Activity+ spent_on: Date+ start_time: Start time+ end_time: Finish time+models:cost_type:one: "Cost type"