d6c384c20f
Seeing `:javascript` all over Views feels like a code smell. This goes a long way towards reducing the amount of JS in views, but there's still plenty to be done on that front.
23 lines
975 B
Text
23 lines
975 B
Text
%h3.page_title
|
|
= "New Team member(s)"
|
|
%hr
|
|
= form_for @team_member, as: :team_member, url: project_team_members_path(@project, @team_member) do |f|
|
|
-if @team_member.errors.any?
|
|
.alert-message.block-message.error
|
|
%ul
|
|
- @team_member.errors.full_messages.each do |msg|
|
|
%li= msg
|
|
|
|
%h6 1. Choose people you want in the team
|
|
.clearfix
|
|
= f.label :user_ids, "People"
|
|
.input= select_tag(:user_ids, options_from_collection_for_select(User.not_in_project(@project).all, :id, :name), {data: {placeholder: "Select users"}, class: "chosen xxlarge", multiple: true})
|
|
|
|
%h6 2. Set access level for them
|
|
.clearfix
|
|
= f.label :project_access, "Project Access"
|
|
.input= select_tag :project_access, options_for_select(Project.access_options, @team_member.project_access), class: "project-access-select chosen"
|
|
|
|
.actions
|
|
= f.submit 'Save', class: "btn save-btn"
|
|
= link_to "Cancel", team_project_path(@project), class: "btn cancel-btn"
|