diff options
Diffstat (limited to 'app/views/projects')
-rw-r--r-- | app/views/projects/settings/_members.html.erb | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/app/views/projects/settings/_members.html.erb b/app/views/projects/settings/_members.html.erb index b5086d836..6bb07c69a 100644 --- a/app/views/projects/settings/_members.html.erb +++ b/app/views/projects/settings/_members.html.erb @@ -18,9 +18,10 @@ <td class="<%= member.principal.class.name.downcase %>"><%= link_to_user member.principal %></td> <td class="roles"> <span id="member-<%= member.id %>-roles"><%=h member.roles.sort.collect(&:to_s).join(', ') %></span> - <% remote_form_for(:membership, member, :url => membership_path(member), + <%= form_for(member, {:as => :membership, :remote => true, :url => membership_path(member), :method => :put, - :html => { :id => "member-#{member.id}-roles-form", :class => 'hol' }) do |f| %> + :html => { :id => "member-#{member.id}-roles-form", :class => 'hol' }} + ) do |f| %> <p><% roles.each do |role| %> <label><%= check_box_tag 'membership[role_ids][]', role.id, member.roles.include?(role), :disabled => member.member_roles.detect {|mr| mr.role_id == role.id && !mr.inherited_from.nil?} %> <%=h role %></label><br /> @@ -59,9 +60,11 @@ <div class="splitcontentright"> <% if roles.any? && principals.any? %> - <% remote_form_for(:membership, @member, :url => project_memberships_path(@project), :method => :post, + <%= form_for(@member, {:as => :membership, :remote => true, + :url => project_memberships_path(@project), :method => :post, :loading => '$(\'member-add-submit\').disable();', - :complete => 'if($(\'member-add-submit\')) $(\'member-add-submit\').enable();') do |f| %> + :complete => 'if($(\'member-add-submit\')) $(\'member-add-submit\').enable();' + } ) do |f| %> <fieldset><legend><%=l(:label_member_new)%></legend> <p><%= label_tag "principal_search", l(:label_principal_search) %><%= text_field_tag 'principal_search', nil %></p> |