diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-06-11 13:51:22 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-06-11 13:51:22 +0300 |
commit | c38a6fe17308769d3d0ddbed99d0768b15c7dc73 (patch) | |
tree | b34584a27cf23e16c962496b750111321c72b9a3 | |
parent | ef935aba4f01fcbf4e9d0b8861b1d8ea5d13ffa6 (diff) | |
download | gitlab-ce-c38a6fe17308769d3d0ddbed99d0768b15c7dc73.tar.gz |
Group people management: replace selectbox with ajax one.
-rw-r--r-- | app/controllers/groups_controller.rb | 2 | ||||
-rw-r--r-- | app/views/groups/_new_group_member.html.haml | 2 | ||||
-rw-r--r-- | app/views/groups/_new_member.html.haml | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb index efc93329ff5..e6559b8d8fe 100644 --- a/app/controllers/groups_controller.rb +++ b/app/controllers/groups_controller.rb @@ -74,7 +74,7 @@ class GroupsController < ApplicationController end 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.' end diff --git a/app/views/groups/_new_group_member.html.haml b/app/views/groups/_new_group_member.html.haml index 9cdbea60370..78db1c23320 100644 --- a/app/views/groups/_new_group_member.html.haml +++ b/app/views/groups/_new_group_member.html.haml @@ -5,7 +5,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.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 .clearfix diff --git a/app/views/groups/_new_member.html.haml b/app/views/groups/_new_member.html.haml index b3424b01bcb..4a762ed39ed 100644 --- a/app/views/groups/_new_member.html.haml +++ b/app/views/groups/_new_member.html.haml @@ -5,7 +5,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).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 .clearfix |