diff options
author | Mike Greiling <mike@pixelcog.com> | 2018-08-08 13:57:34 +0300 |
---|---|---|
committer | Tim Zallmann <tzallmann@gitlab.com> | 2018-08-08 13:57:34 +0300 |
commit | 0f77d24be8fd0969528716b84c4909a0efd71255 (patch) | |
tree | 8e8e528f4781e90d5c903dda80ad4ac8d2d2701a /app/controllers/projects_controller.rb | |
parent | 6aa56a70270001323f85791aec205cce5558501f (diff) |
Keep project settings sections expanded after submitting form
Diffstat (limited to 'app/controllers/projects_controller.rb')
-rw-r--r-- | app/controllers/projects_controller.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 4d7e33d7b11..e9ae8c13142 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -61,7 +61,7 @@ class ProjectsController < Projects::ApplicationController flash[:notice] = _("Project '%{project_name}' was successfully updated.") % { project_name: @project.name } format.html do - redirect_to(edit_project_path(@project)) + redirect_to(edit_project_path(@project, anchor: 'js-general-project-settings')) end else flash.now[:alert] = result[:message] @@ -174,7 +174,7 @@ class ProjectsController < Projects::ApplicationController ) rescue ::Projects::HousekeepingService::LeaseTaken => ex redirect_to( - edit_project_path(@project), + edit_project_path(@project, anchor: 'js-project-advanced-settings'), alert: ex.to_s ) end @@ -183,7 +183,7 @@ class ProjectsController < Projects::ApplicationController @project.add_export_job(current_user: current_user) redirect_to( - edit_project_path(@project), + edit_project_path(@project, anchor: 'js-export-project'), notice: _("Project export started. A download link will be sent by email.") ) end @@ -195,7 +195,7 @@ class ProjectsController < Projects::ApplicationController send_file export_project_path, disposition: 'attachment' else redirect_to( - edit_project_path(@project), + edit_project_path(@project, anchor: 'js-export-project'), alert: _("Project export link has expired. Please generate a new export from your project settings.") ) end @@ -208,7 +208,7 @@ class ProjectsController < Projects::ApplicationController flash[:alert] = _("Project export could not be deleted.") end - redirect_to(edit_project_path(@project)) + redirect_to(edit_project_path(@project, anchor: 'js-export-project')) end def generate_new_export @@ -216,7 +216,7 @@ class ProjectsController < Projects::ApplicationController export else redirect_to( - edit_project_path(@project), + edit_project_path(@project, anchor: 'js-export-project'), alert: _("Project export could not be deleted.") ) end |