%= form_for(@member, :url => membership_path(@member), :as => :membership, :remote => request.xhr?, :method => :put) do |f| %>
<% @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-#{@member.id}-roles').show(); $('#member-#{@member.id}-form').empty(); return false;" if request.xhr? %>
<% end %>