summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2018-08-08 01:24:36 -0500
committerMike Greiling <mike@pixelcog.com>2018-08-08 01:24:36 -0500
commit308a07f365d0ea0828f404d596492ca7318c3674 (patch)
tree0bb6ea068456b2b1d71824fb32e08a211950c464 /app
parent9c0f52714ce9b406a2775a0487843d80e596d9a6 (diff)
downloadgitlab-ce-308a07f365d0ea0828f404d596492ca7318c3674.tar.gz
ensure all group settings panels remain open after form submission
Diffstat (limited to 'app')
-rw-r--r--app/controllers/groups_controller.rb2
-rw-r--r--app/views/groups/settings/_general.html.haml1
-rw-r--r--app/views/groups/settings/_permissions.html.haml1
3 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb
index 79fa5818359..83169636ccf 100644
--- a/app/controllers/groups_controller.rb
+++ b/app/controllers/groups_controller.rb
@@ -85,7 +85,7 @@ class GroupsController < Groups::ApplicationController
def update
if Groups::UpdateService.new(@group, current_user, group_params).execute
- redirect_to edit_group_path(@group), notice: "Group '#{@group.name}' was successfully updated."
+ redirect_to edit_group_path(@group, anchor: params[:update_section]), notice: "Group '#{@group.name}' was successfully updated."
else
@group.restore_path!
diff --git a/app/views/groups/settings/_general.html.haml b/app/views/groups/settings/_general.html.haml
index ab8263533be..0e225fe33a5 100644
--- a/app/views/groups/settings/_general.html.haml
+++ b/app/views/groups/settings/_general.html.haml
@@ -1,4 +1,5 @@
= form_for @group, html: { multipart: true, class: 'gl-show-field-errors' }, authenticity_token: true do |f|
+ %input{ type: 'hidden', name: 'update_section', value: 'js-general-settings' }
= form_errors(@group)
%fieldset
diff --git a/app/views/groups/settings/_permissions.html.haml b/app/views/groups/settings/_permissions.html.haml
index f1f67af1d1e..ffce2d4b14f 100644
--- a/app/views/groups/settings/_permissions.html.haml
+++ b/app/views/groups/settings/_permissions.html.haml
@@ -1,4 +1,5 @@
= form_for @group, html: { multipart: true, class: 'gl-show-field-errors' }, authenticity_token: true do |f|
+ %input{ type: 'hidden', name: 'update_section', value: 'js-permissions-settings' }
= form_errors(@group)
%fieldset