Commit 3735266d authored by Sean McGivern's avatar Sean McGivern

Merge branch 'fix_visibility_level' into 'master'

Fix visibility level on new project page

Closes #19253

See merge request !9885
parents 43c981c7 37ce638c
- page_title 'New Project'
- header_title "Projects", dashboard_projects_path
- visibility_level = params.dig(:project, :visibility_level) || default_project_visibility
.project-edit-container
.project-edit-errors
......@@ -95,7 +96,7 @@
= f.label :visibility_level, class: 'label-light' do
Visibility Level
= link_to icon('question-circle'), help_page_path("public_access/public_access")
= render 'shared/visibility_level', f: f, visibility_level: default_project_visibility, can_change_visibility_level: true, form_model: @project, with_label: false
= render 'shared/visibility_level', f: f, visibility_level: visibility_level.to_i, can_change_visibility_level: true, form_model: @project, with_label: false
= f.submit 'Create project', class: "btn btn-create project-submit", tabindex: 4
= link_to 'Cancel', dashboard_projects_path, class: 'btn btn-cancel'
......
---
title: Fix visibility level on new project page
merge_request: 9885
author: blackst0ne
......@@ -16,6 +16,15 @@ feature "New project", feature: true do
expect(find_field("project_visibility_level_#{level}")).to be_checked
end
it 'saves visibility level on validation error' do
visit new_project_path
choose(key)
click_button('Create project')
expect(find_field("project_visibility_level_#{level}")).to be_checked
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment