Skip to content

Commit

Permalink
Add 'other' field to currently teaching and teaching next year questions
Browse files Browse the repository at this point in the history
  • Loading branch information
Clare Constantine committed Jan 12, 2018
1 parent e9bdee6 commit 5702a78
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ export default class Section2YourSchool extends LabeledFormComponent {
...Object.keys(PageLabels.section2YourSchool),
"currentRole_other",
"gradesTeaching_notTeachingExplanation",
"gradesTeaching_other",
"gradesExpectToTeach_notExpectingToTeachExplanation",
"gradesExpectToTeach_other",
"subjectsTeaching_other",
"subjectsExpectToTeach_other",
"subjectsLicensedToTeach_other",
Expand Down Expand Up @@ -105,11 +107,13 @@ export default class Section2YourSchool extends LabeledFormComponent {
{this.checkBoxesFor("gradesAtSchool")}

{this.checkBoxesWithAdditionalTextFieldsFor("gradesTeaching", {
"I'm not teaching this year (please explain):" : "notTeachingExplanation"
"I'm not teaching this year (Please Explain):" : "notTeachingExplanation",
"Other (Please Explain):" : "other"
})}

{this.checkBoxesWithAdditionalTextFieldsFor("gradesExpectToTeach", {
"I'm not teaching next year (please explain):" : "notExpectingToTeachExplanation"
"I'm not teaching next year (Please Explain):" : "notExpectingToTeachExplanation",
"Other (Please Explain):" : "other"
})}

{this.checkBoxesWithAdditionalTextFieldsFor("subjectsTeaching", {
Expand Down
18 changes: 11 additions & 7 deletions dashboard/app/models/pd/application/teacher1819_application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,11 @@ def enroll_user
OTHER_PLEASE_LIST
]

NOT_TEACHING_NEXT_YEAR = "I'm not teaching next year (please explain):"
NOT_TEACHING_THIS_YEAR = "I'm not teaching this year (please explain):"
DONT_KNOW_IF_I_WILL_TEACH_EXPLAIN = "I don't know if I will teach this course (please explain):"
UNABLE_TO_ATTEND = "No, I'm unable to attend (please explain):"
NO_EXPLAIN = "No (please explain):"
NOT_TEACHING_THIS_YEAR = "I'm not teaching this year (Please Explain):"
NOT_TEACHING_NEXT_YEAR = "I'm not teaching next year (Please Explain):"
DONT_KNOW_IF_I_WILL_TEACH_EXPLAIN = "I don't know if I will teach this course (Please Explain):"
UNABLE_TO_ATTEND = "No, I'm unable to attend (Please Explain):"
NO_EXPLAIN = "No (Please Explain):"
def self.options
{
country: [
Expand Down Expand Up @@ -217,11 +217,13 @@ def self.options
grades_at_school: GRADES,
grades_teaching: [
*GRADES,
NOT_TEACHING_THIS_YEAR
NOT_TEACHING_THIS_YEAR,
OTHER_PLEASE_EXPLAIN
],
grades_expect_to_teach: [
*GRADES,
NOT_TEACHING_NEXT_YEAR
NOT_TEACHING_NEXT_YEAR,
OTHER_PLEASE_EXPLAIN
],

subjects_teaching: SUBJECTS_THIS_YEAR,
Expand Down Expand Up @@ -777,7 +779,9 @@ def additional_text_fields
[
[:current_role, OTHER_PLEASE_LIST],
[:grades_teaching, NOT_TEACHING_THIS_YEAR, :grades_teaching_not_teaching_explanation],
[:grades_teaching, OTHER_PLEASE_EXPLAIN, :grades_teaching_other],
[:grades_expect_to_teach, NOT_TEACHING_NEXT_YEAR, :grades_expect_to_teach_not_expecting_to_teach_explanation],
[:grades_expect_to_teach, OTHER_PLEASE_EXPLAIN, :grades_expect_to_teach_other],
[:subjects_teaching, OTHER_PLEASE_LIST],
[:subjects_expect_to_teach, OTHER_PLEASE_LIST],
[:subjects_licensed_to_teach, OTHER_PLEASE_LIST],
Expand Down

0 comments on commit 5702a78

Please sign in to comment.