Allow Group path to be changed at the same time as name

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
Dmitriy Zaporozhets 2014-12-22 15:02:47 +02:00
parent 52a8e5c01a
commit 1f2628fe21
No known key found for this signature in database
GPG key ID: 161B5D6A44D3D88A
4 changed files with 10 additions and 13 deletions

View file

@ -21,17 +21,6 @@
= link_to 'Cancel', admin_groups_path, class: "btn btn-cancel"
- else
.form-group.group_name_holder
= f.label :path, class: 'control-label' do
%span Group path
.col-sm-10
= f.text_field :path, placeholder: "example-group", class: "form-control danger"
.bs-callout.bs-callout-danger
%ul
%li Changing group path can have unintended side effects.
%li Renaming group path will rename directory for all related projects
%li It will change web url for access group and group projects.
%li It will change the git path to repositories under this group.
.form-actions
= f.submit 'Save changes', class: "btn btn-primary"
= link_to 'Cancel', admin_group_path(@group), class: "btn btn-cancel"

View file

@ -14,6 +14,13 @@
= root_url
= f.text_field :path, placeholder: 'open-source', class: 'form-control',
autofocus: local_assigns[:autofocus] || false
- if @group.persisted?
.bs-callout.bs-callout-danger
%ul
%li Changing group path can have unintended side effects.
%li Renaming group path will rename directory for all related projects
%li It will change web url for access group and group projects.
%li It will change the git path to repositories under this group.
.form-group.group-description-holder
= f.label :description, 'Details', class: 'control-label'

View file

@ -77,7 +77,7 @@ class Spinach::Features::Groups < Spinach::FeatureSteps
end
step 'submit form with new group "Samurai" info' do
fill_in 'group_name', with: 'Samurai'
fill_in 'group_path', with: 'Samurai'
fill_in 'group_description', with: 'Tokugawa Shogunate'
click_button "Create group"
end
@ -94,6 +94,7 @@ class Spinach::Features::Groups < Spinach::FeatureSteps
step 'I change group "Owned" name to "new-name"' do
fill_in 'group_name', with: 'new-name'
fill_in 'group_path', with: 'new-name'
click_button "Save group"
end

View file

@ -3,7 +3,7 @@ class Spinach::Features::ProjectCreate < Spinach::FeatureSteps
include SharedPaths
step 'fill project form with valid data' do
fill_in 'project_name', with: 'Empty'
fill_in 'project_path', with: 'Empty'
click_button "Create project"
end