mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-07 21:48:16 -08:00
working on question lists
This commit is contained in:
parent
cc84c3bbda
commit
4b3693ed42
8 changed files with 24 additions and 15 deletions
|
|
@ -9,12 +9,14 @@
|
|||
%li= message
|
||||
.field
|
||||
= f.label :name
|
||||
= f.text_field :name
|
||||
= f.text_field :name, class: 'form-control'
|
||||
.field
|
||||
= f.label :description
|
||||
= f.text_area :description
|
||||
.field
|
||||
= f.label :question_ids
|
||||
= f.text_area :question_ids
|
||||
.actions
|
||||
= f.submit
|
||||
= 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'
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
%h1 New Question List
|
||||
= render 'form', question_list: @question_list
|
||||
= link_to 'Back', question_lists_path
|
||||
.row
|
||||
.offset-sm-2.col-sm-8
|
||||
%h3 Create A Question List
|
||||
= render 'form', question_list: @question_list
|
||||
%br
|
||||
%p= link_to 'Back', root_path
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
%br/
|
||||
= f.text_area :description, class: 'form-control'
|
||||
.form-group
|
||||
= f.label :recipient_ids, 'Recipients'
|
||||
= 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}" } }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
.row
|
||||
.offset-sm-2.col-sm-8
|
||||
%h3 Create A Recipient List For This School
|
||||
= render 'form'
|
||||
= render 'form', recipient_list: @recipient_list
|
||||
%br
|
||||
%p= link_to 'Back',@school
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
%p
|
||||
%b School:
|
||||
= @school.name
|
||||
= link_to @school.name, @school
|
||||
%p
|
||||
%b Name:
|
||||
= @recipient_list.name
|
||||
|
|
|
|||
|
|
@ -11,6 +11,10 @@
|
|||
|
||||
%p= link_to "Create Recipient List", new_school_recipient_list_path(@school)
|
||||
|
||||
%p= link_to "Create A Question List", new_question_list_path()
|
||||
|
||||
-#%p= link_to "Create A Schedule", new_school_schedule_path(@school)
|
||||
|
||||
= link_to 'Edit', edit_school_path(@school)
|
||||
|
|
||||
= link_to 'Back', root_path
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ RSpec.describe "question_lists/edit", type: :view do
|
|||
|
||||
assert_select "textarea#question_list_description[name=?]", "question_list[description]"
|
||||
|
||||
assert_select "textarea#question_list_question_ids[name=?]", "question_list[question_ids]"
|
||||
assert_select "input[name=?]", "question_list[question_id_array][]"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ RSpec.describe "question_lists/new", type: :view do
|
|||
|
||||
assert_select "textarea#question_list_description[name=?]", "question_list[description]"
|
||||
|
||||
assert_select "textarea#question_list_question_ids[name=?]", "question_list[question_ids]"
|
||||
assert_select "input[name=?]", "question_list[question_id_array][]"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue