new.html.haml 1.04 KB
%h3.page_title
  New members for
  = link_to @team.name, admin_team_path(@team)
  team
%hr
= form_tag admin_team_members_path(@team), id: "team_members", class: "bulk_import", method: :post  do
  - if @team.errors.any?
    .alert.alert-error
      %span= @team.errors.full_messages.first
  .clearfix
    = label_tag :user_ids do
      Users to add
    .input
      = select_tag :user_ids, options_from_collection_for_select(@users , :id, :name_with_username), multiple: true, data: {placeholder: 'Select users'}, class: 'chosen span5'
  .clearfix.group-description-holder
    = label_tag :default_project_access do
      Default permission in projects
    .input
      = select_tag :default_project_access, options_for_select(Project.access_options), {class: "project-access-select chosen span3" }
  .clearfix
    = label_tag :group_admin do
      Is team admin
    .input
      = check_box_tag :group_admin
  .clearfix.form-actions
    = submit_tag 'Add users into team', class: "btn btn-primary", id: :add_members_to_team
    = link_to 'Cancel', :back, class: "btn"