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 forms around the tabs

Klaus Zanders8ff2b3fe1fd7
diff --git a/app/components/projects/configure_view_modal_component.html.erb b/app/components/projects/configure_view_modal_component.html.erb
index 432fbc3d20c..b3231b99d7c 100644
--- a/app/components/projects/configure_view_modal_component.html.erb
+++ b/app/components/projects/configure_view_modal_component.html.erb
@@ -7,20 +7,20 @@
style: "min-height: 430px")) do |d| %>
<% d.with_header(variant: :large, mb: 3) %>
<%= render(Primer::Alpha::Dialog::Body.new) do %>
- <%= render(Primer::Alpha::TabPanels.new(label: "label")) do |tab_panel| %>
- <% tab_panel.with_tab(selected: true, id: "tab-selects") do |tab| %>
- <% tab.with_text { "Fields"} %>
- <% tab.with_panel do %>
- <div id="op-draggable-autocomplete-container">
- <%= primer_form_with(
+ <%= primer_form_with(
url: projects_path,
- id: COLUMN_FORM_ID,
+ id: QUERY_FORM_ID,
method: :get,
data: {
controller: "params-from-query",
'application-target': "dynamic",
'params-from-query-allowed-value': '["filters", "query_id", "page", "per_page", "sortBy"]'
}) do %>
+ <%= render(Primer::Alpha::TabPanels.new(label: "label")) do |tab_panel| %>
+ <% tab_panel.with_tab(selected: true, id: "tab-selects") do |tab| %>
+ <% tab.with_text { "Fields"} %>
+ <% tab.with_panel do %>
+ <div id="op-draggable-autocomplete-container">
<%= helpers.angular_component_tag 'opce-draggable-autocompleter',
inputs: {
options: helpers.projects_columns_options,
@@ -33,20 +33,20 @@
dragAreaLabel: I18n.t(:'queries.configure_view.columns.drag_area_label'),
appendToComponent: true
}%>
- <% end %>
- </div>
+ </div>
+ <% end %>
+ <% end %>
+ <% tab_panel.with_tab(id: "tab-selects") do |tab| %>
+ <% tab.with_text { "Sort By" }%>
+ <% tab.with_panel do %>
+ <h4>Hello world</h4>
+ <% end%>
<% end %>
- <% end %>
- <% tab_panel.with_tab(id: "tab-selects") do |tab| %>
- <% tab.with_text { "Sort By" }%>
- <% tab.with_panel do %>
- <h4>Hello world</h4>
- <% end%>
<% end %>
<% end %>
<% end %>
<%= render(Primer::Alpha::Dialog::Footer.new) do %>
<%= render(Primer::ButtonComponent.new(data: { "close-dialog-id": MODAL_ID })) { I18n.t(:button_cancel) } %>
- <%= render(Primer::ButtonComponent.new(scheme: :primary, type: :submit, form: COLUMN_FORM_ID)) { I18n.t(:button_apply) } %>
+ <%= render(Primer::ButtonComponent.new(scheme: :primary, type: :submit, form: QUERY_FORM_ID)) { I18n.t(:button_apply) } %>
<% end %>
<% end %>
diff --git a/app/components/projects/configure_view_modal_component.rb b/app/components/projects/configure_view_modal_component.rb
index 5d1f93d83aa..2b0d92552cb 100644
--- a/app/components/projects/configure_view_modal_component.rb
+++ b/app/components/projects/configure_view_modal_component.rb
@@ -30,7 +30,7 @@
class Projects::ConfigureViewModalComponent < ApplicationComponent
MODAL_ID = "op-project-list-configure-dialog"
- COLUMN_FORM_ID = "op-project-list-configure-columns-form"
+ QUERY_FORM_ID = "op-project-list-configure-query-form"
COLUMN_HTML_NAME = "columns"
options :query