summaryrefslogtreecommitdiff
path: root/app/views/projects/protected_branches
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2018-08-08 01:17:43 -0500
committerMike Greiling <mike@pixelcog.com>2018-08-08 01:17:43 -0500
commitc90cfbd4eae64d683f04aa03f0135da50ac5b761 (patch)
tree6dad59655f79343a9ed97e625d35a95d8bd69432 /app/views/projects/protected_branches
parent9c0f52714ce9b406a2775a0487843d80e596d9a6 (diff)
downloadgitlab-ce-c90cfbd4eae64d683f04aa03f0135da50ac5b761.tar.gz
ensure all project repository settings panels remain open after form submission
Diffstat (limited to 'app/views/projects/protected_branches')
-rw-r--r--app/views/projects/protected_branches/shared/_create_protected_branch.html.haml1
-rw-r--r--app/views/projects/protected_branches/shared/_index.html.haml2
-rw-r--r--app/views/projects/protected_branches/shared/_protected_branch.html.haml2
3 files changed, 3 insertions, 2 deletions
diff --git a/app/views/projects/protected_branches/shared/_create_protected_branch.html.haml b/app/views/projects/protected_branches/shared/_create_protected_branch.html.haml
index c2d6c034e35..df2dcf19ed4 100644
--- a/app/views/projects/protected_branches/shared/_create_protected_branch.html.haml
+++ b/app/views/projects/protected_branches/shared/_create_protected_branch.html.haml
@@ -1,4 +1,5 @@
= form_for [@project.namespace.becomes(Namespace), @project, @protected_branch], html: { class: 'new-protected-branch js-new-protected-branch' } do |f|
+ %input{ type: 'hidden', name: 'update_section', value: 'js-protected-branches-settings' }
.card
.card-header
%h3.card-title
diff --git a/app/views/projects/protected_branches/shared/_index.html.haml b/app/views/projects/protected_branches/shared/_index.html.haml
index 4f1c6c92484..539b184e5c2 100644
--- a/app/views/projects/protected_branches/shared/_index.html.haml
+++ b/app/views/projects/protected_branches/shared/_index.html.haml
@@ -1,6 +1,6 @@
- expanded = Rails.env.test?
-%section.qa-protected-branches-settings.settings.no-animate{ class: ('expanded' if expanded) }
+%section.qa-protected-branches-settings.settings.no-animate#js-protected-branches-settings{ class: ('expanded' if expanded) }
.settings-header
%h4
Protected Branches
diff --git a/app/views/projects/protected_branches/shared/_protected_branch.html.haml b/app/views/projects/protected_branches/shared/_protected_branch.html.haml
index 05cee483c0e..81b07af22ad 100644
--- a/app/views/projects/protected_branches/shared/_protected_branch.html.haml
+++ b/app/views/projects/protected_branches/shared/_protected_branch.html.haml
@@ -21,4 +21,4 @@
- if can_admin_project
%td
- = link_to 'Unprotect', [@project.namespace.becomes(Namespace), @project, protected_branch], disabled: local_assigns[:disabled], data: { confirm: 'Branch will be writable for developers. Are you sure?' }, method: :delete, class: "btn btn-warning"
+ = link_to 'Unprotect', [@project.namespace.becomes(Namespace), @project, protected_branch, { update_section: 'js-protected-branches-settings' }], disabled: local_assigns[:disabled], data: { confirm: 'Branch will be writable for developers. Are you sure?' }, method: :delete, class: "btn btn-warning"