%h3.page-title Edit Group
%hr
= form_for [:admin, @group], html: { class: "form-horizontal" } do |f|
  - if @group.errors.any?
    .alert.alert-danger
      %span= @group.errors.full_messages.first
  .form-group.group_name_holder
    = f.label :name, class: 'control-label' do
      Group name
    .col-sm-10
      = f.text_field :name, placeholder: "Example Group", class: "form-control"

  .form-group.group-description-holder
    = f.label :description, "Details", class: 'control-label'
    .col-sm-10
      = f.text_area :description, maxlength: 250, class: "form-control js-gfm-input", rows: 4

  .form-group.group_name_holder
    = f.label :path, class: 'control-label' do
      %span.cred Group path
    .col-sm-10
      = f.text_field :path, placeholder: "example-group", class: "form-control danger"
      %ul.cred
        %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-actions
    = f.submit 'Save changes', class: "btn btn-primary"
    = link_to  'Cancel', admin_groups_path, class: "btn btn-cancel"
