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