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
Use separate label and placeholder for Duration
Alexander Brandon Coles721c2a7b0b3d
diff --git a/config/locales/en.yml b/config/locales/en.ymlindex 68b5971eb03..7b95ca41278 100644--- a/config/locales/en.yml+++ b/config/locales/en.yml@@ -2149,6 +2149,9 @@ en:one: "1 s"other: "%{count} s"units:+ minute_abbreviated:+ one: "min"+ other: "mins"hour:one: "hour"other: "hours"diff --git a/modules/meeting/app/forms/meeting_agenda_item/duration.rb b/modules/meeting/app/forms/meeting_agenda_item/duration.rbindex f8d40142f8d..116c785f16f 100644--- a/modules/meeting/app/forms/meeting_agenda_item/duration.rb+++ b/modules/meeting/app/forms/meeting_agenda_item/duration.rb@@ -1,4 +1,5 @@# frozen_string_literal: true+#-- copyright# OpenProject is an open source project management software.# Copyright (C) the OpenProject GmbH@@ -31,7 +32,7 @@ class MeetingAgendaItem::Duration < ApplicationFormform do |agenda_item_form|agenda_item_form.text_field(name: :duration_in_minutes,- placeholder: I18n.t("activerecord.attributes.meeting_agenda_item.duration_in_minutes"),+ placeholder: I18n.t("datetime.units.minute_abbreviated", count: 2),label: MeetingAgendaItem.human_attribute_name(:duration_in_minutes),leading_visual: { icon: :stopwatch },visually_hide_label: true,diff --git a/modules/meeting/config/locales/en.yml b/modules/meeting/config/locales/en.ymlindex 215dece663b..b2b5ab049dd 100644--- a/modules/meeting/config/locales/en.yml+++ b/modules/meeting/config/locales/en.yml@@ -56,7 +56,7 @@ en:meeting_agenda_item:title: "Title"author: "Author"- duration_in_minutes: "min"+ duration_in_minutes: "Duration"description: "Notes"presenter: "Presenter"meeting_section:diff --git a/modules/meeting/spec/components/meeting_agenda_items/form_component_spec.rb b/modules/meeting/spec/components/meeting_agenda_items/form_component_spec.rbindex 03b3d9a3be4..e6265ee79b5 100644--- a/modules/meeting/spec/components/meeting_agenda_items/form_component_spec.rb+++ b/modules/meeting/spec/components/meeting_agenda_items/form_component_spec.rb@@ -59,7 +59,7 @@ RSpec.describe MeetingAgendaItems::FormComponent, type: :component doendit "renders duration field" do- expect(rendered_component).to have_field "min", type: :number+ expect(rendered_component).to have_field "Duration", type: :number, placeholder: "mins"endit "renders presenter field" dodiff --git a/modules/meeting/spec/features/structured_meetings/history_spec.rb b/modules/meeting/spec/features/structured_meetings/history_spec.rbindex 78d9296e73d..252b096e245 100644--- a/modules/meeting/spec/features/structured_meetings/history_spec.rb+++ b/modules/meeting/spec/features/structured_meetings/history_spec.rb@@ -132,7 +132,7 @@ RSpec.describe "history",show_page.add_agenda_item dofill_in "Title", with: "My agenda item"- fill_in "min", with: "25"+ fill_in "Duration", with: "25"endshow_page.expect_agenda_item(title: "My agenda item")@@ -157,7 +157,7 @@ RSpec.describe "history",item = MeetingAgendaItem.find_by(title: "My agenda item")show_page.edit_agenda_item(item) dofill_in "Title", with: "Updated title"- fill_in "min", with: "5"+ fill_in "Duration", with: "5"click_on "Save"enddiff --git a/modules/meeting/spec/features/structured_meetings/structured_meeting_crud_spec.rb b/modules/meeting/spec/features/structured_meetings/structured_meeting_crud_spec.rbindex 02be677f193..ba3bb042a06 100644--- a/modules/meeting/spec/features/structured_meetings/structured_meeting_crud_spec.rb+++ b/modules/meeting/spec/features/structured_meetings/structured_meeting_crud_spec.rb@@ -96,7 +96,7 @@ RSpec.describe "Meetings CRUD",# Can add and edit a single itemshow_page.add_agenda_item dofill_in "Title", with: "My agenda item"- fill_in "min", with: "25"+ fill_in "Duration", with: "25"endshow_page.expect_agenda_item title: "My agenda item"@@ -181,7 +181,7 @@ RSpec.describe "Meetings CRUD",show_page.add_agenda_item dofill_in "Title", with: "My agenda item"- fill_in "min", with: "25"+ fill_in "Duration", with: "25"endshow_page.expect_agenda_item title: "My agenda item"@@ -268,7 +268,7 @@ RSpec.describe "Meetings CRUD",# Can add and edit a single itemshow_page.add_agenda_item dofill_in "Title", with: "My agenda item"- fill_in "min", with: "25"+ fill_in "Duration", with: "25"endshow_page.expect_agenda_item title: "My agenda item"@@ -290,7 +290,7 @@ RSpec.describe "Meetings CRUD",show_page.add_agenda_item dofill_in "Title", with: "My agenda item"- fill_in "min", with: "25"+ fill_in "Duration", with: "25"endshow_page.expect_agenda_item title: "My agenda item"@@ -468,7 +468,7 @@ RSpec.describe "Meetings CRUD",# add an item to the latest sectionshow_page.add_agenda_item dofill_in "Title", with: "First item"- fill_in "min", with: "25"+ fill_in "Duration", with: "25"endshow_page.expect_agenda_item_in_section title: "First item", section: second_section@@ -479,7 +479,7 @@ RSpec.describe "Meetings CRUD",item_in_second_section = MeetingAgendaItem.find_by!(title: "First item")show_page.edit_agenda_item(item_in_second_section) do- fill_in "min", with: "15"+ fill_in "Duration", with: "15"click_on "Save"end