Commit c38a6fe17308769d3d0ddbed99d0768b15c7dc73
1 parent
ef935aba
Exists in
master
and in
4 other branches
Group people management: replace selectbox with ajax one.
Showing
3 changed files
with
3 additions
and
3 deletions
Show diff stats
app/controllers/groups_controller.rb
... | ... | @@ -74,7 +74,7 @@ class GroupsController < ApplicationController |
74 | 74 | end |
75 | 75 | |
76 | 76 | def team_members |
77 | - @group.add_users_to_project_teams(params[:user_ids], params[:project_access]) | |
77 | + @group.add_users_to_project_teams(params[:user_ids].split(','), params[:project_access]) | |
78 | 78 | redirect_to people_group_path(@group), notice: 'Users were successfully added.' |
79 | 79 | end |
80 | 80 | ... | ... |
app/views/groups/_new_group_member.html.haml
... | ... | @@ -5,7 +5,7 @@ |
5 | 5 | %h6 1. Choose people you want in the team |
6 | 6 | .clearfix |
7 | 7 | = f.label :user_ids, "People" |
8 | - .input= select_tag(:user_ids, options_from_collection_for_select(User.active.alphabetically, :id, :name), {data: {placeholder: "Select users"}, class: "chosen xxlarge", multiple: true}) | |
8 | + .input= users_select_tag(:user_ids, multiple: true) | |
9 | 9 | |
10 | 10 | %h6 2. Set access level for them |
11 | 11 | .clearfix | ... | ... |
app/views/groups/_new_member.html.haml
... | ... | @@ -5,7 +5,7 @@ |
5 | 5 | %h6 1. Choose people you want in the team |
6 | 6 | .clearfix |
7 | 7 | = f.label :user_ids, "People" |
8 | - .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}) | |
8 | + .input= users_select_tag(:user_ids, multiple: true) | |
9 | 9 | |
10 | 10 | %h6 2. Set access level for them |
11 | 11 | .clearfix | ... | ... |