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
Rename `admin_settings_primer_form_with` to `settings_primer_form_with`
Henriette Dargeb8a28efb4120
diff --git a/app/components/custom_fields/details_component.html.erb b/app/components/custom_fields/details_component.html.erbindex 47f257a4bd6..6bdd6fe91c1 100644--- a/app/components/custom_fields/details_component.html.erb+++ b/app/components/custom_fields/details_component.html.erb@@ -15,7 +15,7 @@endcontent.with_row do- admin_settings_primer_form_with(+ settings_primer_form_with(model:,scope: :custom_field,id: "custom_field_form",diff --git a/app/components/op_primer/form_helpers.rb b/app/components/op_primer/form_helpers.rbindex e1070b5c019..ba8a4668569 100644--- a/app/components/op_primer/form_helpers.rb+++ b/app/components/op_primer/form_helpers.rb@@ -122,7 +122,7 @@ module OpPrimer# have a unified look and feel for our users.## @example- # admin_settings_primer_form_with(scope: :settings, action: :update, method: :patch) do |form|+ # settings_primer_form_with(scope: :settings, action: :update, method: :patch) do |form|# render_inline_settings_form(form) do |f|# f.check_box(name: :allow_tracking_start_and_end_times)# f.check_box(name: :enforce_tracking_start_and_end_times)@@ -133,7 +133,7 @@ module OpPrimer## @param kwargs [Hash] The arguments for the form# @param block [Proc] A block that defines the form structure.- def admin_settings_primer_form_with(**, &)+ def settings_primer_form_with(**, &)render(Primer::BaseComponent.new(tag: :div, classes: "op-admin-settings-form-wrapper")) doprimer_form_with(**, &)enddiff --git a/app/components/projects/life_cycle_step_definitions/form_component.html.erb b/app/components/projects/life_cycle_step_definitions/form_component.html.erbindex e9fb8fbae31..8085ef0ddef 100644--- a/app/components/projects/life_cycle_step_definitions/form_component.html.erb+++ b/app/components/projects/life_cycle_step_definitions/form_component.html.erb@@ -27,7 +27,7 @@ See COPYRIGHT and LICENSE files for more details.++#%>-<%= admin_settings_primer_form_with(+<%= settings_primer_form_with(model: [:admin, :settings, model],data: { controller: "show-when-checked" }) do |f|diff --git a/app/components/projects/settings/general/show_component.html.erb b/app/components/projects/settings/general/show_component.html.erbindex 17e32a4b582..d09dbf5fa04 100644--- a/app/components/projects/settings/general/show_component.html.erb+++ b/app/components/projects/settings/general/show_component.html.erb@@ -30,7 +30,7 @@ See COPYRIGHT and LICENSE files for more details.<%=flex_layout do |container|container.with_row(mb: 3) do- admin_settings_primer_form_with(model: project, url: project_settings_general_path(project)) do |f|+ settings_primer_form_with(model: project, url: project_settings_general_path(project)) do |f|concat(render(Primer::Beta::Subhead.new) do |component|component.with_heading(tag: :h2, size: :medium) { I18n.t("projects.settings.header_details") }@@ -49,7 +49,7 @@ See COPYRIGHT and LICENSE files for more details.endcontainer.with_row(mb: 3) do- admin_settings_primer_form_with(model: project, url: project_settings_general_path(project)) do |f|+ settings_primer_form_with(model: project, url: project_settings_general_path(project)) do |f|concat(render(Primer::Beta::Subhead.new) do |component|component.with_heading(tag: :h2, size: :medium) { I18n.t("projects.settings.header_status") }@@ -68,7 +68,7 @@ See COPYRIGHT and LICENSE files for more details.endcontainer.with_row(mb: 3) do- admin_settings_primer_form_with(model: project, url: project_settings_general_path(project)) do |f|+ settings_primer_form_with(model: project, url: project_settings_general_path(project)) do |f|concat(render(Primer::Beta::Subhead.new) do |component|component.with_heading(tag: :h2, size: :medium) { I18n.t("projects.settings.header_relations") }diff --git a/app/components/work_packages/types/settings_component.html.erb b/app/components/work_packages/types/settings_component.html.erbindex 623376f9d09..bae0a30f35e 100644--- a/app/components/work_packages/types/settings_component.html.erb+++ b/app/components/work_packages/types/settings_component.html.erb@@ -28,7 +28,7 @@ See COPYRIGHT and LICENSE files for more details.++#%><%=- admin_settings_primer_form_with(**form_options) do |f|+ settings_primer_form_with(**form_options) do |f|render(WorkPackages::Types::SettingsForm.new(f))end%>diff --git a/app/components/work_packages/types/subject_configuration_component.html.erb b/app/components/work_packages/types/subject_configuration_component.html.erbindex 03b77fd4e42..4c1550b80f4 100644--- a/app/components/work_packages/types/subject_configuration_component.html.erb+++ b/app/components/work_packages/types/subject_configuration_component.html.erb@@ -32,7 +32,7 @@ See COPYRIGHT and LICENSE files for more details.%><%=- admin_settings_primer_form_with(**form_options) do |f|+ settings_primer_form_with(**form_options) do |f|render(WorkPackages::Types::SubjectConfigurationForm.new(f))end%>diff --git a/app/views/admin/settings/authentication_settings/_login.html.erb b/app/views/admin/settings/authentication_settings/_login.html.erbindex 78bd29a2f9b..42ae953af15 100644--- a/app/views/admin/settings/authentication_settings/_login.html.erb+++ b/app/views/admin/settings/authentication_settings/_login.html.erb@@ -28,7 +28,7 @@ See COPYRIGHT and LICENSE files for more details.++#%><%=- admin_settings_primer_form_with(scope: :settings,+ settings_primer_form_with(scope: :settings,url: admin_settings_authentication_path(tab: params[:tab]),method: :patch) do |f|render_inline_settings_form(f) do |form|diff --git a/app/views/admin/settings/authentication_settings/_passwords.html.erb b/app/views/admin/settings/authentication_settings/_passwords.html.erbindex 22e4c01f565..d577d74850e 100644--- a/app/views/admin/settings/authentication_settings/_passwords.html.erb+++ b/app/views/admin/settings/authentication_settings/_passwords.html.erb@@ -28,7 +28,7 @@ See COPYRIGHT and LICENSE files for more details.++#%><%=- admin_settings_primer_form_with(scope: :settings,+ settings_primer_form_with(scope: :settings,url: admin_settings_authentication_path(tab: params[:tab]),data: { turbo_method: :patch },method: :patch) do |f|diff --git a/app/views/admin/settings/authentication_settings/_registration.html.erb b/app/views/admin/settings/authentication_settings/_registration.html.erbindex 50c11d5588c..6e85785cb1d 100644--- a/app/views/admin/settings/authentication_settings/_registration.html.erb+++ b/app/views/admin/settings/authentication_settings/_registration.html.erb@@ -28,7 +28,7 @@ See COPYRIGHT and LICENSE files for more details.++#%><%=- admin_settings_primer_form_with(scope: :settings,+ settings_primer_form_with(scope: :settings,url: admin_settings_authentication_path(tab: params[:tab]),data: { turbo_method: :patch },method: :patch) do |f|diff --git a/app/views/admin/settings/progress_tracking/show.html.erb b/app/views/admin/settings/progress_tracking/show.html.erbindex 383eb7dbf83..9c45f0cc223 100644--- a/app/views/admin/settings/progress_tracking/show.html.erb+++ b/app/views/admin/settings/progress_tracking/show.html.erb@@ -38,7 +38,7 @@ See COPYRIGHT and LICENSE files for more details.end%><%=- admin_settings_primer_form_with(+ settings_primer_form_with(scope: :settings, action: :update, method: :patch,data: {application_target: "dynamic",diff --git a/app/views/admin/settings/work_package_priorities/edit.html.erb b/app/views/admin/settings/work_package_priorities/edit.html.erbindex c3cc4c7082c..b20ef8c7ec9 100644--- a/app/views/admin/settings/work_package_priorities/edit.html.erb+++ b/app/views/admin/settings/work_package_priorities/edit.html.erb@@ -43,6 +43,6 @@ See COPYRIGHT and LICENSE files for more details.end%>-<%= admin_settings_primer_form_with(model: @enumeration, scope: :enumeration, url: url_for(action: :update, id: @enumeration)) do |f| %>+<%= settings_primer_form_with(model: @enumeration, scope: :enumeration, url: url_for(action: :update, id: @enumeration)) do |f| %><%= render(Admin::Enumerations::ItemForm.new(f)) %><% end %>diff --git a/app/views/admin/settings/work_package_priorities/new.html.erb b/app/views/admin/settings/work_package_priorities/new.html.erbindex 4fc91cb1caa..2d38005321b 100644--- a/app/views/admin/settings/work_package_priorities/new.html.erb+++ b/app/views/admin/settings/work_package_priorities/new.html.erb@@ -41,6 +41,6 @@ See COPYRIGHT and LICENSE files for more details.end%>-<%= admin_settings_primer_form_with(model: @enumeration, scope: :enumeration, url: url_for(action: :create)) do |f| %>+<%= settings_primer_form_with(model: @enumeration, scope: :enumeration, url: url_for(action: :create)) do |f| %><%= render(Admin::Enumerations::ItemForm.new(f)) %><% end %>diff --git a/app/views/statuses/edit.html.erb b/app/views/statuses/edit.html.erbindex c288054bdb6..eb5b1aa5b93 100644--- a/app/views/statuses/edit.html.erb+++ b/app/views/statuses/edit.html.erb@@ -44,7 +44,7 @@ See COPYRIGHT and LICENSE files for more details.<%= error_messages_for :status %><%=- admin_settings_primer_form_with(+ settings_primer_form_with(model: @status,data: {application_target: "dynamic",diff --git a/lookbook/docs/patterns/17-settings-pages.md.erb b/lookbook/docs/patterns/17-settings-pages.md.erbindex fb76f3956f9..47c8c12dd62 100644--- a/lookbook/docs/patterns/17-settings-pages.md.erb+++ b/lookbook/docs/patterns/17-settings-pages.md.erb@@ -4,12 +4,12 @@ Settings pages usually stretch to the full width of the viewport as they tend noAs specified in the documentation for [forms](./forms), we prefer limiting the width of a form for legibility. Because the default behaviour of form elements to fill the full width of the container, we wrap forms in a container that limits its available width.-Any view component rendering a form should use the the `admin_settings_primer_form_with` form helper instead of the standard `primer_form_with`. The form itself stays unchanged. This+Any view component rendering a form should use the the `settings_primer_form_with` form helper instead of the standard `primer_form_with`. The form itself stays unchanged. Thisway, the rendered form is wrapped into a container with `680px` max-width.```erb<%%=- admin_settings_primer_form_with(**form_options) do |f|+ settings_primer_form_with(**form_options) do |f|render(WorkPackages::Types::SettingsForm.new(f))end %>```diff --git a/modules/costs/app/views/admin/costs_settings/show.html.erb b/modules/costs/app/views/admin/costs_settings/show.html.erbindex df8384eea0c..809bb7e6b4b 100644--- a/modules/costs/app/views/admin/costs_settings/show.html.erb+++ b/modules/costs/app/views/admin/costs_settings/show.html.erb@@ -53,7 +53,7 @@ See COPYRIGHT and LICENSE files for more details.dismissable: false))%><%=- admin_settings_primer_form_with(scope: :settings, action: :update, method: :patch) do |time_form|+ settings_primer_form_with(scope: :settings, action: :update, method: :patch) do |time_form|render_inline_settings_form(time_form) do |form|form.html_content dorender(Primer::Beta::Subhead.new(hide_border: true)) do |subhead|@@ -76,7 +76,7 @@ See COPYRIGHT and LICENSE files for more details.component.with_tab(id: "tab-costs") do |tab|tab.with_text { I18n.t(:label_costs) }tab.with_panel do- admin_settings_primer_form_with(scope: :settings, action: :update, method: :patch) do |time_form|+ settings_primer_form_with(scope: :settings, action: :update, method: :patch) do |time_form|render_inline_settings_form(time_form) do |form|form.html_content dorender(Primer::Beta::Subhead.new(hide_border: true)) do |subhead|diff --git a/modules/costs/app/views/admin/settings/time_entry_activities/edit.html.erb b/modules/costs/app/views/admin/settings/time_entry_activities/edit.html.erbindex 5870f2af448..9f582aabdc9 100644--- a/modules/costs/app/views/admin/settings/time_entry_activities/edit.html.erb+++ b/modules/costs/app/views/admin/settings/time_entry_activities/edit.html.erb@@ -43,6 +43,6 @@ See COPYRIGHT and LICENSE files for more details.end%>-<%= admin_settings_primer_form_with(model: @enumeration, scope: :enumeration, url: url_for(action: :update, id: @enumeration)) do |f| %>+<%= settings_primer_form_with(model: @enumeration, scope: :enumeration, url: url_for(action: :update, id: @enumeration)) do |f| %><%= render(Admin::Enumerations::ItemForm.new(f)) %><% end %>diff --git a/modules/documents/app/views/admin/settings/document_categories/edit.html.erb b/modules/documents/app/views/admin/settings/document_categories/edit.html.erbindex dfba6ded0f7..4340ede5e0e 100644--- a/modules/documents/app/views/admin/settings/document_categories/edit.html.erb+++ b/modules/documents/app/views/admin/settings/document_categories/edit.html.erb@@ -42,6 +42,6 @@ See COPYRIGHT and LICENSE files for more details.end%>-<%= admin_settings_primer_form_with(model: @enumeration, scope: :enumeration, url: url_for(action: :update, id: @enumeration)) do |f| %>+<%= settings_primer_form_with(model: @enumeration, scope: :enumeration, url: url_for(action: :update, id: @enumeration)) do |f| %><%= render(Admin::Enumerations::ItemForm.new(f)) %><% end %>