%= render partial: 'shared/form_model_errors', locals: { obj: user} %>
<%= form_for user, url: action do |form| %>
<%= form.label :name, "Full Name" %>
<%= form.text_field :name %>
<%= form.label :email, "eMail" %>
<%= form.email_field :email %>
<%= form.label :role, "Role" %>
<%= form.select :role, admin_role_options(user.role), include_blank: false %>
<%= form.collection_check_boxes(:quiz_ids, Quiz.all, :id, :name, {}, {class: 'checkbox'}) do | quiz | %>
<%= quiz.check_box( checked: user.quizzes.include?(quiz.object)) %>
<%= quiz.label %>
<% end %>
<%= form.submit %>
<% end %>