2017-08-09 06:58:00 -04:00
|
|
|
- parent = @group.parent
|
2017-03-18 08:01:00 -04:00
|
|
|
- group_path = root_url
|
|
|
|
- group_path << parent.full_path + '/' if parent
|
2014-12-22 06:50:58 -05:00
|
|
|
|
2018-04-18 12:43:53 -04:00
|
|
|
.form-group.row
|
|
|
|
= f.label :path, class: 'col-form-label col-sm-2' do
|
2014-12-22 06:50:58 -05:00
|
|
|
Group path
|
2014-10-20 18:25:44 -04:00
|
|
|
.col-sm-10
|
2016-10-21 07:54:24 -04:00
|
|
|
.input-group.gl-field-error-anchor
|
2018-04-12 16:32:55 -04:00
|
|
|
.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 + '/'
|
2017-08-09 06:58:00 -04:00
|
|
|
= f.hidden_field :parent_id
|
2014-12-22 06:50:58 -05:00
|
|
|
= f.text_field :path, placeholder: 'open-source', class: 'form-control',
|
2016-11-25 11:35:25 -05:00
|
|
|
autofocus: local_assigns[:autofocus] || false, required: true,
|
2017-05-24 16:59:26 -04:00
|
|
|
pattern: Gitlab::PathRegex::NAMESPACE_FORMAT_REGEX_JS,
|
2017-03-12 11:22:00 -04:00
|
|
|
title: 'Please choose a group path with no special characters.',
|
2017-02-20 08:51:47 -05:00
|
|
|
"data-bind-in" => "#{'create_chat_team' if Gitlab.config.mattermost.enabled}"
|
2016-10-21 07:54:24 -04:00
|
|
|
|
2014-12-22 08:02:47 -05:00
|
|
|
- if @group.persisted?
|
2015-03-18 23:16:36 -04:00
|
|
|
.alert.alert-warning.prepend-top-10
|
2017-08-29 18:16:01 -04:00
|
|
|
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'
|
2014-10-20 18:25:44 -04:00
|
|
|
|
2018-04-18 12:43:53 -04:00
|
|
|
.form-group.row.group-name-holder
|
|
|
|
= f.label :name, class: 'col-form-label col-sm-2' do
|
2017-03-12 11:22:00 -04:00
|
|
|
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.'
|
|
|
|
|
2018-04-19 09:47:36 -04:00
|
|
|
- if @group.persisted?
|
2018-04-25 11:51:53 -04:00
|
|
|
.form-group.row.group-name-holder
|
|
|
|
= f.label :id, class: 'col-form-label col-sm-2' do
|
2018-04-19 09:47:36 -04:00
|
|
|
= _("Group ID")
|
|
|
|
.col-sm-10
|
|
|
|
= f.text_field :id, class: 'form-control', readonly: true
|
|
|
|
|
2018-04-18 12:43:53 -04:00
|
|
|
.form-group.row.group-description-holder
|
|
|
|
= f.label :description, class: 'col-form-label col-sm-2'
|
2014-10-20 18:25:44 -04:00
|
|
|
.col-sm-10
|
|
|
|
= f.text_area :description, maxlength: 250,
|
|
|
|
class: 'form-control js-gfm-input', rows: 4
|