Dont allow select block user as new team member

This commit is contained in:
Dmitriy Zaporozhets 2012-12-04 15:22:22 +02:00
parent ba74fa1413
commit d8398921eb
2 changed files with 2 additions and 2 deletions

View file

@ -10,7 +10,7 @@ class Admin::ProjectsController < AdminController
end
def show
@users = User.scoped
@users = User.active
@users = @users.not_in_project(@project) if @project.users.present?
@users = @users.all
end

View file

@ -11,7 +11,7 @@
%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})
.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})
%h6 2. Set access level for them
.clearfix