debian-mirror-gitlab/app/views/shared/_group_form.html.haml

50 lines
2.2 KiB
Text
Raw Normal View History

2018-03-17 18:26:18 +05:30
- parent = @group.parent
2017-08-17 22:00:37 +05:30
- group_path = root_url
- group_path << parent.full_path + '/' if parent
2015-04-26 12:48:37 +05:30
2018-12-13 13:39:08 +05:30
.row
.form-group.group-name-holder.col-sm-12
= f.label :name, class: 'label-bold' do
= _("Group name")
2020-06-23 00:09:42 +05:30
= f.text_field :name, placeholder: _('My Awesome Group'), class: 'js-autofill-group-name form-control input-lg',
2018-12-13 13:39:08 +05:30
required: true,
title: _('Please fill in a descriptive name for your group.'),
autofocus: true
.row
.form-group.col-xs-12.col-sm-8
= f.label :path, class: 'label-bold' do
= _("Group URL")
2017-08-17 22:00:37 +05:30
.input-group.gl-field-error-anchor
2018-11-08 19:23:39 +05:30
.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 + '/'
2018-03-17 18:26:18 +05:30
= f.hidden_field :parent_id
2020-06-23 00:09:42 +05:30
= f.text_field :path, placeholder: _('my-awesome-group'), class: 'form-control js-validate-group-path js-autofill-group-path',
2017-08-17 22:00:37 +05:30
autofocus: local_assigns[:autofocus] || false, required: true,
2017-09-10 17:25:29 +05:30
pattern: Gitlab::PathRegex::NAMESPACE_FORMAT_REGEX_JS,
2018-12-13 13:39:08 +05:30
title: _('Please choose a group URL with no special characters.'),
2017-08-17 22:00:37 +05:30
"data-bind-in" => "#{'create_chat_team' if Gitlab.config.mattermost.enabled}"
2019-12-26 22:10:19 +05:30
%p.validation-error.gl-field-error.field-validation.hide
= _('Group path is already taken. Suggestions: ')
%span.gl-path-suggestions
%p.validation-success.gl-field-success.field-validation.hide= _('Group path is available.')
2020-10-24 23:57:45 +05:30
%p.validation-pending.gl-field-error-ignore.field-validation.hide= _('Checking group URL availability...')
2017-08-17 22:00:37 +05:30
2015-04-26 12:48:37 +05:30
- if @group.persisted?
2020-11-24 15:15:51 +05:30
.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
= _('Changing group URL can have unintended side effects.')
= succeed '.' do
2021-04-17 20:07:23 +05:30
= link_to _('Learn more'), help_page_path('user/group/index', anchor: 'change-a-groups-path'), target: '_blank', class: 'gl-link'
2015-04-26 12:48:37 +05:30
2018-10-15 14:42:47 +05:30
- if @group.persisted?
2018-12-13 13:39:08 +05:30
.row
.form-group.group-name-holder.col-sm-8
= f.label :id, class: 'label-bold' do
= _("Group ID")
2018-10-15 14:42:47 +05:30
= f.text_field :id, class: 'form-control', readonly: true