_form.html.haml 988 Bytes
Newer Older
1 2
%h3.page_title
  = "New Team member(s)"
3
%hr
4
= form_for @team_member, as: :team_member, url: project_team_members_path(@project, @team_member) do |f|
5
  -if @team_member.errors.any?
6 7 8 9 10
    .alert-message.block-message.error
      %ul
        - @team_member.errors.full_messages.each do |msg|
          %li= msg

11
  %h6 1. Choose people you want in the team
12
  .clearfix
13
    = f.label :user_ids, "People"
14
    .input= select_tag(:user_ids, options_from_collection_for_select(User.active.not_in_project(@project).all, :id, :name), {data: {placeholder: "Select users"}, class: "chosen xxlarge", multiple: true})
15

16
  %h6 2. Set access level for them
17 18
  .clearfix
    = f.label :project_access, "Project Access"
19
    .input= select_tag :project_access, options_for_select(Project.access_options, @team_member.project_access), class: "project-access-select chosen"
20

21
  .actions
22
    = f.submit 'Save', class: "btn save-btn"
23
    = link_to "Cancel", project_team_index_path(@project), class: "btn cancel-btn"