Commit d8398921 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Dont allow select block user as new team member

parent ba74fa14
...@@ -10,7 +10,7 @@ class Admin::ProjectsController < AdminController ...@@ -10,7 +10,7 @@ class Admin::ProjectsController < AdminController
end end
def show def show
@users = User.scoped @users = User.active
@users = @users.not_in_project(@project) if @project.users.present? @users = @users.not_in_project(@project) if @project.users.present?
@users = @users.all @users = @users.all
end end
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
%h6 1. Choose people you want in the team %h6 1. Choose people you want in the team
.clearfix .clearfix
= f.label :user_ids, "People" = 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 %h6 2. Set access level for them
.clearfix .clearfix
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment