Skip to content

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

move content_controller 'admin--custom-fields' to form partial

Ivan Kuchin0d03688bbf0d
diff --git a/app/views/admin/settings/project_custom_fields/edit.html.erb b/app/views/admin/settings/project_custom_fields/edit.html.erb
index 3a1d6ecae8c..8d61c687036 100644
--- a/app/views/admin/settings/project_custom_fields/edit.html.erb
+++ b/app/views/admin/settings/project_custom_fields/edit.html.erb
@@ -26,10 +26,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See COPYRIGHT and LICENSE files for more details.
++#%>
-<% html_title t(:label_administration), t("settings.project_attributes.heading"), @custom_field.name %>
-
-<% content_controller 'admin--custom-fields', dynamic: true, 'admin--custom-fields-format-config-value': custom_fields_format_config %>
+<% html_title t(:label_administration), t("settings.project_attributes.heading"), @custom_field.name %>
<% local_assigns[:additional_breadcrumb] = @custom_field.name %>
<%=
diff --git a/app/views/admin/settings/project_custom_fields/new.html.erb b/app/views/admin/settings/project_custom_fields/new.html.erb
index 6e59bba0828..2b232156857 100644
--- a/app/views/admin/settings/project_custom_fields/new.html.erb
+++ b/app/views/admin/settings/project_custom_fields/new.html.erb
@@ -26,7 +26,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See COPYRIGHT and LICENSE files for more details.
++#%>
-<% content_controller 'admin--custom-fields', dynamic: true, 'admin--custom-fields-format-config-value': custom_fields_format_config %>
<% html_title t(:label_administration), t("settings.project_attributes.heading"), t('settings.project_attributes.new.heading') %>
<% local_assigns[:additional_breadcrumb] = t('settings.project_attributes.new.heading') %>
diff --git a/app/views/custom_fields/_form.html.erb b/app/views/custom_fields/_form.html.erb
index 5c0fa4bf77c..1db1eb151a3 100644
--- a/app/views/custom_fields/_form.html.erb
+++ b/app/views/custom_fields/_form.html.erb
@@ -29,6 +29,8 @@ See COPYRIGHT and LICENSE files for more details.
<% format_dependent = CustomFieldsHelper::FormatDependent.new(@custom_field.field_format) %>
+<% content_controller 'admin--custom-fields', dynamic: true, 'admin--custom-fields-format-config-value': custom_fields_format_config %>
+
<section class="form--section" id="custom_field_form">
<div class="form--field -required" id="custom_field_name_attributes">
<%= f.text_field :name, required: true, container_class: '-middle' %>
diff --git a/app/views/custom_fields/edit.html.erb b/app/views/custom_fields/edit.html.erb
index 73d29e57c5d..2948d4b2744 100644
--- a/app/views/custom_fields/edit.html.erb
+++ b/app/views/custom_fields/edit.html.erb
@@ -27,8 +27,6 @@ See COPYRIGHT and LICENSE files for more details.
++#%>
-<% content_controller 'admin--custom-fields', dynamic: true, 'admin--custom-fields-format-config-value': custom_fields_format_config %>
-
<% html_title t(:label_administration), "#{t(:label_edit)} #{CustomField.model_name.human} #{h @custom_field.name}" %>
<% local_assigns[:additional_breadcrumb] = [
link_to(I18n.t(@custom_field.type_name), custom_fields_path(tab: @custom_field.type)),
diff --git a/app/views/custom_fields/new.html.erb b/app/views/custom_fields/new.html.erb
index 659b40ec258..1d4bc944785 100644
--- a/app/views/custom_fields/new.html.erb
+++ b/app/views/custom_fields/new.html.erb
@@ -27,8 +27,6 @@ See COPYRIGHT and LICENSE files for more details.
++#%>
-<% content_controller 'admin--custom-fields', dynamic: true, 'admin--custom-fields-format-config-value': custom_fields_format_config %>
-
<% html_title t(:label_administration), t(:label_custom_field_new) %>
<% local_assigns[:additional_breadcrumb] = [
link_to(I18n.t(@custom_field.type_name), custom_fields_path(tab: @custom_field.type)),