2017-08-09 10:58:00 +00:00
|
|
|
- parent = @group.parent
|
2017-03-18 12:01:00 +00:00
|
|
|
- group_path = root_url
|
|
|
|
- group_path << parent.full_path + '/' if parent
|
2014-12-22 11:50:58 +00:00
|
|
|
|
2018-10-30 16:23:47 +00:00
|
|
|
.row
|
|
|
|
.form-group.group-name-holder.col-sm-12
|
|
|
|
= f.label :name, class: 'label-bold' do
|
2022-02-03 15:12:41 +00:00
|
|
|
= s_('Groups|Group name')
|
|
|
|
= f.text_field :name, placeholder: _('My awesome group'), class: 'js-autofill-group-name form-control input-lg', data: { qa_selector: 'group_name_field' },
|
2018-10-30 16:23:47 +00:00
|
|
|
required: true,
|
2022-02-03 15:12:41 +00:00
|
|
|
title: s_('Groups|Enter a descriptive name for your group.'),
|
2018-10-30 16:23:47 +00:00
|
|
|
autofocus: true
|
2022-02-03 15:12:41 +00:00
|
|
|
.text-muted
|
|
|
|
= s_('Groups|Must start with letter, digit, emoji, or underscore. Can also contain periods, dashes, spaces, and parentheses.')
|
2018-10-30 16:23:47 +00:00
|
|
|
|
|
|
|
.row
|
|
|
|
.form-group.col-xs-12.col-sm-8
|
|
|
|
= f.label :path, class: 'label-bold' do
|
2022-02-03 15:12:41 +00:00
|
|
|
= s_('Groups|Group URL')
|
2016-10-21 11:54:24 +00:00
|
|
|
.input-group.gl-field-error-anchor
|
2018-04-12 20:32:55 +00: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 10:58:00 +00:00
|
|
|
= f.hidden_field :parent_id
|
2021-04-23 21:09:46 +00:00
|
|
|
= f.text_field :path, placeholder: _('my-awesome-group'), class: 'form-control js-validate-group-path js-autofill-group-path', data: { qa_selector: 'group_path_field' },
|
2016-11-25 16:35:25 +00:00
|
|
|
autofocus: local_assigns[:autofocus] || false, required: true,
|
2017-05-24 20:59:26 +00:00
|
|
|
pattern: Gitlab::PathRegex::NAMESPACE_FORMAT_REGEX_JS,
|
2021-07-21 12:09:35 +00:00
|
|
|
title: group_url_error_message,
|
|
|
|
maxlength: ::Namespace::URL_MAX_LENGTH,
|
2017-02-20 13:51:47 +00:00
|
|
|
"data-bind-in" => "#{'create_chat_team' if Gitlab.config.mattermost.enabled}"
|
2019-11-06 00:06:13 +00:00
|
|
|
%p.validation-error.gl-field-error.field-validation.hide
|
2022-02-03 15:12:41 +00:00
|
|
|
= s_('Groups|Group path is unavailable. Path has been replaced with a suggested available path.')
|
|
|
|
%p.validation-success.gl-field-success.field-validation.hide= s_('Groups|Group path is available.')
|
|
|
|
%p.validation-pending.gl-field-error-ignore.field-validation.hide= s_('Groups|Checking group URL availability...')
|
2016-10-21 11:54:24 +00:00
|
|
|
|
2014-12-22 13:02:47 +00:00
|
|
|
- if @group.persisted?
|
2020-09-14 18:09:48 +00:00
|
|
|
.gl-alert.gl-alert-warning.gl-mt-3.gl-mb-3
|
|
|
|
= sprite_icon('warning', size: 16, css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title')
|
|
|
|
.gl-alert-body
|
2022-02-03 15:12:41 +00:00
|
|
|
= s_('Groups|Changing group URL can have unintended side effects.')
|
2020-09-14 18:09:48 +00:00
|
|
|
= succeed '.' do
|
2022-02-03 15:12:41 +00:00
|
|
|
= link_to s_('Groups|Learn more'), help_page_path('user/group/index', anchor: 'change-a-groups-path'), target: '_blank', class: 'gl-link'
|
2014-10-20 22:25:44 +00:00
|
|
|
|
2018-04-19 13:47:36 +00:00
|
|
|
- if @group.persisted?
|
2018-10-30 16:23:47 +00:00
|
|
|
.row
|
|
|
|
.form-group.group-name-holder.col-sm-8
|
|
|
|
= f.label :id, class: 'label-bold' do
|
2022-02-03 15:12:41 +00:00
|
|
|
= s_('Groups|Group ID')
|
2018-04-19 13:47:36 +00:00
|
|
|
= f.text_field :id, class: 'form-control', readonly: true
|