BigW Consortium Gitlab

_group_form.html.haml 1.4 KB
Newer Older
1
- parent = Group.find_by(id: params[:parent_id] || @group.parent_id)
2 3 4 5 6 7 8
- if @group.persisted?
  .form-group
    = f.label :name, class: 'control-label' do
      Group name
    .col-sm-10
      = f.text_field :name, placeholder: 'open-source', class: 'form-control'

Ciro Santilli committed
9
.form-group
10 11
  = f.label :path, class: 'control-label' do
    Group path
Ciro Santilli committed
12
  .col-sm-10
13
    .input-group.gl-field-error-anchor
14
      .input-group-addon
15 16 17
        %span>= root_url
        - if parent
          %strong= parent.full_path + '/'
18
      = f.text_field :path, placeholder: 'open-source', class: 'form-control',
19 20 21
        autofocus: local_assigns[:autofocus] || false, required: true,
        pattern: Gitlab::Regex::NAMESPACE_REGEX_STR_SIMPLE,
        title: 'Please choose a group name with no special characters.'
22 23
      - if parent
        = f.hidden_field :parent_id, value: parent.id
24

25
    - if @group.persisted?
26
      .alert.alert-warning.prepend-top-10
27 28 29 30 31
        %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.
Ciro Santilli committed
32 33

.form-group.group-description-holder
34
  = f.label :description, class: 'control-label'
Ciro Santilli committed
35 36 37
  .col-sm-10
    = f.text_area :description, maxlength: 250,
        class: 'form-control js-gfm-input', rows: 4