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
change label of start date if it is a milestone
Behrokh Satarnejadaa3009677b80
diff --git a/app/components/work_packages/date_picker/date_form_component.html.erb b/app/components/work_packages/date_picker/date_form_component.html.erbindex 2e050621b96..0a99d3e9331 100644--- a/app/components/work_packages/date_picker/date_form_component.html.erb+++ b/app/components/work_packages/date_picker/date_form_component.html.erb@@ -18,7 +18,7 @@endstart_date.with_row(classes: "wp-datepicker-dialog-date-form--text-field-container") do- render(Primer::Alpha::TextField.new(**text_field_options(name: :start_date, label: I18n.t("attributes.start_date"))))+ render(Primer::Alpha::TextField.new(**text_field_options(name: :start_date, label: start_date_label)))endstart_date.with_row(classes: "wp-datepicker-dialog-set-today-link") dorender_today_link(name: :start_date)diff --git a/app/components/work_packages/date_picker/date_form_component.rb b/app/components/work_packages/date_picker/date_form_component.rbindex 7f304470436..03667e13604 100644--- a/app/components/work_packages/date_picker/date_form_component.rb+++ b/app/components/work_packages/date_picker/date_form_component.rb@@ -114,6 +114,14 @@ module WorkPackagesname == :durationend+ def start_date_label+ if @is_milestone+ I18n.t("attributes.date")+ else+ I18n.t("attributes.start_date")+ end+ end+def update_focused_field(focused_field)if @date_mode.nil? || @date_mode != "range"return focused_field_for_single_date_mode(focused_field)diff --git a/config/locales/en.yml b/config/locales/en.ymlindex 42590814520..e598bb7450f 100644--- a/config/locales/en.yml+++ b/config/locales/en.yml@@ -2985,6 +2985,7 @@ en:label_token_version: "Token Version"label_today_as_start_date: "Select today as start date."label_today_as_due_date: "Select today as finish date."+ label_today_as_date: "Select today as date."label_top_menu: "Top Menu"label_topic_plural: "Topics"label_total: "Total"