Commit 87f082de authored by Zeger-Jan van de Weg's avatar Zeger-Jan van de Weg

Frontend to send template name instead of on/off

The params were not getting a value other than `project_templates:"on"`
so the backend wasn't sure what template to use.

Fixes gitlab-org/gitlab-ce#36492
parent 36ba84cb
...@@ -28,7 +28,7 @@ class ProjectsController < Projects::ApplicationController ...@@ -28,7 +28,7 @@ class ProjectsController < Projects::ApplicationController
end end
def create def create
@project = ::Projects::CreateService.new(current_user, project_params).execute @project = ::Projects::CreateService.new(current_user, project_params.merge(template_name: params[:template_name])).execute
if @project.saved? if @project.saved?
cookies[:issue_board_welcome_hidden] = { path: project_path(@project), value: nil, expires: Time.at(0) } cookies[:issue_board_welcome_hidden] = { path: project_path(@project), value: nil, expires: Time.at(0) }
......
...@@ -5,6 +5,6 @@ ...@@ -5,6 +5,6 @@
Blank Blank
- Gitlab::ProjectTemplate.all.each do |template| - Gitlab::ProjectTemplate.all.each do |template|
.btn .btn
%input{ type: "radio", autocomplete: "off", name: "project_templates", id: template.name } %input{ type: "radio", autocomplete: "off", name: "project[template_name]", id: template.name, value: template.name }
= custom_icon(template.logo) = custom_icon(template.logo)
= template.title = template.title
...@@ -18,7 +18,7 @@ feature 'Project' do ...@@ -18,7 +18,7 @@ feature 'Project' do
click_button "Create project" click_button "Create project"
end end
expect(page).to have_content 'This project Loading..' expect(page).to have_content template.name
end 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