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
Hide label, duplicate help text
Alexander Brandon Coles4cb133a50b08
diff --git a/app/components/projects/status_button_component.html.erb b/app/components/projects/status_button_component.html.erbindex 88a5e178f35..63fefe1d2dc 100644--- a/app/components/projects/status_button_component.html.erb+++ b/app/components/projects/status_button_component.html.erb@@ -15,14 +15,17 @@))end- flex.with_column(mr: 2) do- render(- OpenProject::Common::AttributeLabelComponent.new(- attribute: :status,- model: project,- current_user: user++ unless hide_help_text?+ flex.with_column(mr: 2) do+ render(+ OpenProject::Common::AttributeLabelComponent.new(+ attribute: :status,+ model: project,+ current_user: user+ ))- )+ endendendenddiff --git a/app/components/projects/status_button_component.rb b/app/components/projects/status_button_component.rbindex c2f64e25377..0692529aa0c 100644--- a/app/components/projects/status_button_component.rb+++ b/app/components/projects/status_button_component.rb@@ -34,14 +34,16 @@ class Projects::StatusButtonComponent < ApplicationComponentinclude OpPrimer::ComponentHelpersinclude ProjectStatusHelper- attr_reader :project, :user+ attr_reader :project, :user, :hide_help_text+ alias :hide_help_text? :hide_help_text- def initialize(project:, user:, size: :medium)+ def initialize(project:, user:, size: :medium, hide_help_text: false)super@project = project@user = user@size = size+ @hide_help_text = hide_help_text@status = find_status(project.status_code)enddiff --git a/app/forms/projects/settings/status_form.rb b/app/forms/projects/settings/status_form.rbindex 0cf03aa266f..2bf29f957cf 100644--- a/app/forms/projects/settings/status_form.rb+++ b/app/forms/projects/settings/status_form.rb@@ -30,10 +30,15 @@module Projectsmodule Settingsclass StatusForm < ApplicationForm+ extend Dry::Initializer++ option :hide_label, default: -> { false }+form do |f|f.rich_text_area(name: :status_explanation,label: attribute_name(:status_explanation),+ visually_hide_label: hide_label,rich_text_options: {showAttachments: false,data: { qa_field_name: "statusExplanation" }diff --git a/modules/overviews/app/components/overviews/widgets/project_status_component.html.erb b/modules/overviews/app/components/overviews/widgets/project_status_component.html.erbindex 1969403e234..e145d5a824c 100644--- a/modules/overviews/app/components/overviews/widgets/project_status_component.html.erb+++ b/modules/overviews/app/components/overviews/widgets/project_status_component.html.erb@@ -37,8 +37,8 @@ See COPYRIGHT and LICENSE files for more details.) do |f|render(Primer::Forms::FormList.new(- Projects::StatusButtonComponent.new(project:, user: current_user),- Projects::Settings::StatusForm.new(f),+ Projects::StatusButtonComponent.new(project:, user: current_user, hide_help_text: true),+ Projects::Settings::StatusForm.new(f, hide_label: true),Projects::Settings::Submit.new(f, label: I18n.t("projects.settings.button_update_status_description"))))