diff options
author | Sean McGivern <sean@gitlab.com> | 2017-02-01 19:38:52 +0300 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2017-02-02 13:23:50 +0300 |
commit | f799585c41d801bc657f992adf3d4b201af927d2 (patch) | |
tree | 024671600d97ba514bd06f896b4f508f4e790ace /app/views/projects/snippets | |
parent | 659cceb0e8694b58a8b665de3f338245244ef114 (diff) |
Keep snippet visibility on error
When a snippet is submitted, but there's an error, we didn't keep the
visibility level. As the default is private, this means that submitting
a public snippet that failed would then fall back to being a private
snippet.
Diffstat (limited to 'app/views/projects/snippets')
-rw-r--r-- | app/views/projects/snippets/edit.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/snippets/new.html.haml | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/views/projects/snippets/edit.html.haml b/app/views/projects/snippets/edit.html.haml index 216f70f5605..fb39028529d 100644 --- a/app/views/projects/snippets/edit.html.haml +++ b/app/views/projects/snippets/edit.html.haml @@ -3,4 +3,4 @@ %h3.page-title Edit Snippet %hr -= render "shared/snippets/form", url: namespace_project_snippet_path(@project.namespace, @project, @snippet), visibility_level: @snippet.visibility_level += render "shared/snippets/form", url: namespace_project_snippet_path(@project.namespace, @project, @snippet) diff --git a/app/views/projects/snippets/new.html.haml b/app/views/projects/snippets/new.html.haml index 772a594269c..cfed3a79bc5 100644 --- a/app/views/projects/snippets/new.html.haml +++ b/app/views/projects/snippets/new.html.haml @@ -3,4 +3,4 @@ %h3.page-title New Snippet %hr -= render "shared/snippets/form", url: namespace_project_snippets_path(@project.namespace, @project, @snippet), visibility_level: default_snippet_visibility += render "shared/snippets/form", url: namespace_project_snippets_path(@project.namespace, @project, @snippet) |