Commit 89b2df9b authored by Tim Zallmann's avatar Tim Zallmann

Merge branch '35952-keep-project-cicd-settings-open-after-submit' into 'master'

Keep project CI/CD settings sections expanded after submitting form

See merge request gitlab-org/gitlab-ce!21077
parents 861b16b5 50908fbe
...@@ -5,7 +5,7 @@ class Projects::RunnersController < Projects::ApplicationController ...@@ -5,7 +5,7 @@ class Projects::RunnersController < Projects::ApplicationController
layout 'project_settings' layout 'project_settings'
def index def index
redirect_to project_settings_ci_cd_path(@project) redirect_to project_settings_ci_cd_path(@project, anchor: 'js-runners-settings')
end end
def edit def edit
...@@ -50,13 +50,13 @@ class Projects::RunnersController < Projects::ApplicationController ...@@ -50,13 +50,13 @@ class Projects::RunnersController < Projects::ApplicationController
def toggle_shared_runners def toggle_shared_runners
project.toggle!(:shared_runners_enabled) project.toggle!(:shared_runners_enabled)
redirect_to project_settings_ci_cd_path(@project) redirect_to project_settings_ci_cd_path(@project, anchor: 'js-runners-settings')
end end
def toggle_group_runners def toggle_group_runners
project.toggle_ci_cd_settings!(:group_runners_enabled) project.toggle_ci_cd_settings!(:group_runners_enabled)
redirect_to project_settings_ci_cd_path(@project) redirect_to project_settings_ci_cd_path(@project, anchor: 'js-runners-settings')
end end
protected protected
......
...@@ -7,7 +7,7 @@ class Projects::TriggersController < Projects::ApplicationController ...@@ -7,7 +7,7 @@ class Projects::TriggersController < Projects::ApplicationController
layout 'project_settings' layout 'project_settings'
def index def index
redirect_to project_settings_ci_cd_path(@project) redirect_to project_settings_ci_cd_path(@project, anchor: 'js-pipeline-triggers')
end end
def create def create
...@@ -19,7 +19,7 @@ class Projects::TriggersController < Projects::ApplicationController ...@@ -19,7 +19,7 @@ class Projects::TriggersController < Projects::ApplicationController
flash[:alert] = 'You could not create a new trigger.' flash[:alert] = 'You could not create a new trigger.'
end end
redirect_to project_settings_ci_cd_path(@project) redirect_to project_settings_ci_cd_path(@project, anchor: 'js-pipeline-triggers')
end end
def take_ownership def take_ownership
...@@ -29,7 +29,7 @@ class Projects::TriggersController < Projects::ApplicationController ...@@ -29,7 +29,7 @@ class Projects::TriggersController < Projects::ApplicationController
flash[:alert] = 'You could not take ownership of trigger.' flash[:alert] = 'You could not take ownership of trigger.'
end end
redirect_to project_settings_ci_cd_path(@project) redirect_to project_settings_ci_cd_path(@project, anchor: 'js-pipeline-triggers')
end end
def edit def edit
...@@ -37,7 +37,7 @@ class Projects::TriggersController < Projects::ApplicationController ...@@ -37,7 +37,7 @@ class Projects::TriggersController < Projects::ApplicationController
def update def update
if trigger.update(trigger_params) if trigger.update(trigger_params)
redirect_to project_settings_ci_cd_path(@project), notice: 'Trigger was successfully updated.' redirect_to project_settings_ci_cd_path(@project, anchor: 'js-pipeline-triggers'), notice: 'Trigger was successfully updated.'
else else
render action: "edit" render action: "edit"
end end
...@@ -50,7 +50,7 @@ class Projects::TriggersController < Projects::ApplicationController ...@@ -50,7 +50,7 @@ class Projects::TriggersController < Projects::ApplicationController
flash[:alert] = "Could not remove the trigger." flash[:alert] = "Could not remove the trigger."
end end
redirect_to project_settings_ci_cd_path(@project), status: :found redirect_to project_settings_ci_cd_path(@project, anchor: 'js-pipeline-triggers'), status: :found
end end
private private
......
.row .row
.col-lg-12 .col-lg-12
= form_for @project, url: project_settings_ci_cd_path(@project) do |f| = form_for @project, url: project_settings_ci_cd_path(@project, anchor: 'autodevops-settings') do |f|
= form_errors(@project) = form_errors(@project)
%fieldset.builds-feature.js-auto-devops-settings %fieldset.builds-feature.js-auto-devops-settings
.form-group .form-group
......
.row.prepend-top-default .row.prepend-top-default
.col-lg-12 .col-lg-12
= form_for @project, url: project_settings_ci_cd_path(@project) do |f| = form_for @project, url: project_settings_ci_cd_path(@project, anchor: 'js-general-pipeline-settings') do |f|
= form_errors(@project) = form_errors(@project)
%fieldset.builds-feature %fieldset.builds-feature
.form-group.append-bottom-default.js-secret-runner-token .form-group.append-bottom-default.js-secret-runner-token
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment