small refactoring
This commit is contained in:
parent
21a32fba6c
commit
9c0ae23927
|
@ -38,9 +38,9 @@ class Groups::MembersController < Groups::BaseController
|
||||||
end
|
end
|
||||||
|
|
||||||
def add
|
def add
|
||||||
@user = User.find_by_uname(params[:user_id])
|
@user = User.find_by_uname(params[:user_uname])
|
||||||
if !@user
|
if !@user
|
||||||
flash[:error] = t("flash.collaborators.wrong_user", :uname => params[:user_id])
|
flash[:error] = t("flash.collaborators.wrong_user", :uname => params[:user_uname])
|
||||||
elsif parent.add_member(@user, params[:role])
|
elsif parent.add_member(@user, params[:role])
|
||||||
flash[:notice] = t("flash.members.successfully_added")
|
flash[:notice] = t("flash.members.successfully_added")
|
||||||
else
|
else
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
.hr.top
|
.hr.top
|
||||||
|
|
||||||
= form_tag add_group_members_path(parent) do
|
= form_tag add_group_members_path(parent) do
|
||||||
.admin-search= autocomplete_field_tag 'user_id', params[:user_id], autocomplete_user_uname_autocompletes_path#, :id_element => '#member_id_field'
|
.admin-search= autocomplete_field_tag 'user_uname', params[:user_uname], autocomplete_user_uname_autocompletes_path
|
||||||
.admin-role
|
.admin-role
|
||||||
.lineForm= select_tag 'role', options_for_collaborators_roles_select
|
.lineForm= select_tag 'role', options_for_collaborators_roles_select
|
||||||
.both
|
.both
|
||||||
|
|
Loading…
Reference in New Issue