Merged r3934 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3984 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
7ca197b37f
commit
5345a2dd89
|
@ -141,6 +141,7 @@ class GroupsController < ApplicationController
|
|||
@membership = Member.edit_membership(params[:membership_id], params[:membership], @group)
|
||||
@membership.save if request.post?
|
||||
respond_to do |format|
|
||||
if @membership.valid?
|
||||
format.html { redirect_to :controller => 'groups', :action => 'edit', :id => @group, :tab => 'memberships' }
|
||||
format.js {
|
||||
render(:update) {|page|
|
||||
|
@ -148,6 +149,13 @@ class GroupsController < ApplicationController
|
|||
page.visual_effect(:highlight, "member-#{@membership.id}")
|
||||
}
|
||||
}
|
||||
else
|
||||
format.js {
|
||||
render(:update) {|page|
|
||||
page.alert(l(:notice_failed_to_save_members, :errors => @membership.errors.full_messages.join(', ')))
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -123,6 +123,7 @@ class UsersController < ApplicationController
|
|||
@membership = Member.edit_membership(params[:membership_id], params[:membership], @user)
|
||||
@membership.save if request.post?
|
||||
respond_to do |format|
|
||||
if @membership.valid?
|
||||
format.html { redirect_to :controller => 'users', :action => 'edit', :id => @user, :tab => 'memberships' }
|
||||
format.js {
|
||||
render(:update) {|page|
|
||||
|
@ -130,6 +131,13 @@ class UsersController < ApplicationController
|
|||
page.visual_effect(:highlight, "member-#{@membership.id}")
|
||||
}
|
||||
}
|
||||
else
|
||||
format.js {
|
||||
render(:update) {|page|
|
||||
page.alert(l(:notice_failed_to_save_members, :errors => @membership.errors.full_messages.join(', ')))
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue