<%= _('Changing role of %s') % @member.name %>
<%= labelled_form_for :member, :url => {:action => 'update_roles'} do |f| %>
<%= _('Roles:') %>
<% @roles.each do |r| %>
<%= labelled_check_box(r.name, 'roles[]', r.id, @associations.map(&:role).include?(r) ) %>
<% r.permissions.each do |p| %>
- <%= permission_name(p) %>
<% end %>
<% end %>
<% unless @custom_roles.empty? %>
<%= _('Custom Roles:') %>
<% @custom_roles.each do |r| %>
<%= labelled_check_box(r.name, 'roles[]', r.id, @associations.map(&:role).include?(r) ) %>
<% r.permissions.each do |p| %>
- <%= permission_name(p) %>
<% end %>
<% end %>
<% end %>
<%= hidden_field_tag 'person', @member.id %>
<%= button_bar do %>
<%= submit_button('save', _('Save changes'), :cancel => {:action => 'index'}) %>
<% end %>
<% end %>