<% @user_role_models.each do |ua| %>
<%= check_box_tag "user[active_roles][]", ua.key, (@user.active_roles.include?(ua.key) rescue false) %> <%= ua.i18n_variable[locale] %>
<% end -%>
<%= hidden_field_tag 'user[active_roles][]', '' %>
<%= image_tag(@user.avatar.thumb.url) if @user.avatar? %>
<%= file_field_tag 'file' %>
<%= hidden_field_tag :avatar_cache %>
<%= f.label :email %>
<%= f.text_field :email %>
<%= t('panel.admin') %>
<%= f.check_box :admin %>
<% if @user_info_models %>
<% end %>
<% if @user_role_models %>
0 rescue nil) %>>
<% @user_role_models.each do |ua| %>
>
<%= render :partial => 'user_attribute',
:object => (@user.user_roles.detect {|u| u.key == ua.key } || @user.user_roles.build),
:locals => {:ua => ua, :type => 'role'} %>
<% end -%>
<% end %>
<% content_for :page_specific_javascript do %>
<% end -%>