mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-07 21:48:16 -08:00
22 lines
839 B
Text
22 lines
839 B
Text
= form_for(question_list) do |f|
|
|
- if question_list.errors.any?
|
|
#error_explanation
|
|
%h2
|
|
= pluralize(question_list.errors.count, "error")
|
|
prohibited this question_list from being saved:
|
|
%ul
|
|
- question_list.errors.full_messages.each do |message|
|
|
%li= message
|
|
.form-group
|
|
= f.label :name
|
|
= f.text_field :name, class: 'form-control'
|
|
.form-group
|
|
= f.label :description
|
|
= f.text_area :description, class: 'form-control'
|
|
.form-group
|
|
= f.label :question_id_array, 'Questions'
|
|
%br/
|
|
.form-check.form-check-collection
|
|
= f.collection_check_boxes(:question_id_array, Question.all, :id, :text) { |c| c.label(class: 'form-check-label') { c.check_box(class: 'form-check-input') + " #{c.text}" } }
|
|
.form-group
|
|
= f.submit 'Save List', class: 'btn btn-primary'
|