gitlab-org--gitlab-foss/app/views/shared/_group_form.html.haml
2018-04-18 11:43:53 -05:00

40 lines
1.6 KiB
Text

- parent = @group.parent
- group_path = root_url
- group_path << parent.full_path + '/' if parent
.form-group.row
= f.label :path, class: 'col-form-label col-sm-2' do
Group path
.col-sm-10
.input-group.gl-field-error-anchor
.group-root-path.input-group-prepend.has-tooltip{ title: group_path, :'data-placement' => 'bottom' }
.input-group-text
%span>= root_url
- if parent
%strong= parent.full_path + '/'
= f.hidden_field :parent_id
= f.text_field :path, placeholder: 'open-source', class: 'form-control',
autofocus: local_assigns[:autofocus] || false, required: true,
pattern: Gitlab::PathRegex::NAMESPACE_FORMAT_REGEX_JS,
title: 'Please choose a group path with no special characters.',
"data-bind-in" => "#{'create_chat_team' if Gitlab.config.mattermost.enabled}"
- if @group.persisted?
.alert.alert-warning.prepend-top-10
Changing group path can have unintended side effects.
= succeed '.' do
= link_to 'Learn more', help_page_path('user/group/index', anchor: 'changing-a-groups-path'), target: '_blank'
.form-group.row.group-name-holder
= f.label :name, class: 'col-form-label col-sm-2' do
Group name
.col-sm-10
= f.text_field :name, class: 'form-control',
required: true,
title: 'You can choose a descriptive name different from the path.'
.form-group.row.group-description-holder
= f.label :description, class: 'col-form-label col-sm-2'
.col-sm-10
= f.text_area :description, maxlength: 250,
class: 'form-control js-gfm-input', rows: 4