ensure all group settings panels remain open after form submission

This commit is contained in:
Mike Greiling 2018-08-08 01:24:36 -05:00
parent 9c0f52714c
commit 308a07f365
No known key found for this signature in database
GPG Key ID: 0303DF507FA67596
3 changed files with 3 additions and 1 deletions

View File

@ -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!

View File

@ -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

View File

@ -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