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.
25 lines
882 B
25 lines
882 B
= form_for([@school, @recipient_list]) do |f|
|
|
- if @recipient_list.errors.any?
|
|
#error_explanation
|
|
%h2
|
|
= pluralize(@recipient_list.errors.count, "error")
|
|
prohibited this recipient_list from being saved:
|
|
%ul
|
|
- @recipient_list.errors.full_messages.each do |msg|
|
|
%li= msg
|
|
.form-group
|
|
= f.label :name
|
|
%br/
|
|
= f.text_field :name, class: 'form-control'
|
|
.form-group
|
|
= f.label :description
|
|
%br/
|
|
= f.text_area :description, class: 'form-control'
|
|
.form-group
|
|
= f.label :recipient_id_array, 'Recipients'
|
|
%br/
|
|
.form-check.form-check-collection
|
|
= f.collection_check_boxes(:recipient_id_array, @school.recipients.all, :id, :name) { |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'
|