d0beb755f9
Enables user specification of group name vs. name inferred from group path. Cause new group form to copy name from path Adds some new page-specific javascript that copies entry from the group path field to the group name field when the group name field is initially empty. Remove duplicate group name entry field on group edit form This corrects the duplicated name entry field and tests that the JavaScript does not update the group name field if the user edits the group path. (Editing the group path is not recommended in any case, but it is possible.) Address eslint errors in group.js Enable group name copy with dispatch and explore group creation The dispatch and explore group creation forms require the group.js asset, and their tests now require testing against poltergeist Update workflow new group instruction Update the gitlab basics group creation document Add a change log entry Remove unused variable for eslint
44 lines
1.8 KiB
Text
44 lines
1.8 KiB
Text
- content_for :page_specific_javascripts do
|
|
= page_specific_javascript_bundle_tag('group')
|
|
- parent = GroupFinder.new(current_user).execute(id: params[:parent_id] || @group.parent_id)
|
|
- group_path = root_url
|
|
- group_path << parent.full_path + '/' if parent
|
|
|
|
.form-group
|
|
= f.label :path, class: 'control-label' do
|
|
Group path
|
|
.col-sm-10
|
|
.input-group.gl-field-error-anchor
|
|
.group-root-path.input-group-addon.has-tooltip{ title: group_path, :'data-placement' => 'bottom' }
|
|
%span>= root_url
|
|
- if parent
|
|
%strong= parent.full_path + '/'
|
|
= f.text_field :path, placeholder: 'open-source', class: 'form-control',
|
|
autofocus: local_assigns[:autofocus] || false, required: true,
|
|
pattern: Gitlab::Regex::NAMESPACE_REGEX_STR_JS,
|
|
title: 'Please choose a group path with no special characters.',
|
|
"data-bind-in" => "#{'create_chat_team' if Gitlab.config.mattermost.enabled}"
|
|
- if parent
|
|
= f.hidden_field :parent_id, value: parent.id
|
|
|
|
- if @group.persisted?
|
|
.alert.alert-warning.prepend-top-10
|
|
%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-name-holder
|
|
= f.label :name, class: 'control-label' 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.group-description-holder
|
|
= f.label :description, class: 'control-label'
|
|
.col-sm-10
|
|
= f.text_area :description, maxlength: 250,
|
|
class: 'form-control js-gfm-input', rows: 4
|