_form.html.haml 980 Bytes
%h3.page-title
  New project member(s)

= form_for @user_project_relation, as: :project_member, url: project_team_members_path(@project), html: { class: "form-horizontal users-project-form" } do |f|
  -if @user_project_relation.errors.any?
    .alert.alert-danger
      %ul
        - @user_project_relation.errors.full_messages.each do |msg|
          %li= msg

  %p 1. Choose people you want in the project
  .form-group
    = f.label :user_ids, "People", class: 'control-label'
    .col-sm-10
      = users_select_tag(:user_ids, multiple: true)

  %p 2. Set access level for them
  .form-group
    = f.label :access_level, "Project Access", class: 'control-label'
    .col-sm-10= select_tag :access_level, options_for_select(Gitlab::Access.options, @user_project_relation.access_level), class: "project-access-select select2"

  .form-actions
    = f.submit 'Add users', class: "btn btn-create"
    = link_to "Cancel", project_team_index_path(@project), class: "btn btn-cancel"