You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
sqm-dashboards/app/views/question_lists/_form.html.haml

23 lines
839 B

= 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'