diff options
author | Tim Zallmann <tzallmann@gitlab.com> | 2018-08-08 10:40:21 +0000 |
---|---|---|
committer | Tim Zallmann <tzallmann@gitlab.com> | 2018-08-08 10:40:21 +0000 |
commit | 6aa56a70270001323f85791aec205cce5558501f (patch) | |
tree | 9ef72066479747e70bd367ec235efcd7d9bf34ee /app | |
parent | 81b1fd6f7a92744b67570706203cd0d2cd9ee923 (diff) | |
parent | 308a07f365d0ea0828f404d596492ca7318c3674 (diff) | |
download | gitlab-ce-6aa56a70270001323f85791aec205cce5558501f.tar.gz |
Merge branch '35952-keep-group-settings-open-after-submit' into 'master'
Keep group settings sections expanded after submitting form
See merge request gitlab-org/gitlab-ce!21083
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/groups_controller.rb | 2 | ||||
-rw-r--r-- | app/views/groups/settings/_general.html.haml | 1 | ||||
-rw-r--r-- | app/views/groups/settings/_permissions.html.haml | 1 |
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 |