Commit c38a6fe1 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Group people management: replace selectbox with ajax one.

parent ef935aba
...@@ -74,7 +74,7 @@ class GroupsController < ApplicationController ...@@ -74,7 +74,7 @@ class GroupsController < ApplicationController
end end
def team_members def team_members
@group.add_users_to_project_teams(params[:user_ids], params[:project_access]) @group.add_users_to_project_teams(params[:user_ids].split(','), params[:project_access])
redirect_to people_group_path(@group), notice: 'Users were successfully added.' redirect_to people_group_path(@group), notice: 'Users were successfully added.'
end end
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,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.active.alphabetically, :id, :name), {data: {placeholder: "Select users"}, class: "chosen xxlarge", multiple: true}) .input= users_select_tag(:user_ids, multiple: true)
%h6 2. Set access level for them %h6 2. Set access level for them
.clearfix .clearfix
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,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).alphabetically, :id, :name), {data: {placeholder: "Select users"}, class: "chosen xxlarge", multiple: true}) .input= users_select_tag(:user_ids, 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