%= form_for(@membership, :url => principal_membership_path(@principal, @membership), :as => :membership, :remote => request.xhr?, :method => :put) do %>
<% @roles.each do |role| %> <% end %>
<%= hidden_field_tag 'membership[role_ids][]', '', :id => nil %><%= submit_tag l(:button_save) %> <%= link_to_function l(:button_cancel), "$('#member-#{@membership.id}-roles').show(); $('#member-#{@membership.id}-form').empty(); return false;" if request.xhr? %>
<% end %>