diff --git a/app/routes.js b/app/routes.js index 5a3c05e1..892be2d8 100644 --- a/app/routes.js +++ b/app/routes.js @@ -9,7 +9,7 @@ router.post('/claimant-reduced-qs-yes-or-no', function (req, res) { let questionsYesorNo = req.session.data['pc-questions'] if (questionsYesorNo == 'Yes') { - res.redirect('/sex?defendant=false') + res.redirect('/sex?defendant=false&') } else { res.redirect('https://cmc-prototype-pc.herokuapp.com/prototypes/prototype-may-2019/dashboard/new-dashboard/claimant/all-claims') } @@ -21,7 +21,7 @@ router.post('/defendant-reduced-qs-yes-or-no', function (req, res) { let questionsYesorNo = req.session.data['pc-questions'] if (questionsYesorNo == 'Yes') { - res.redirect('/sex?defendant=true') + res.redirect('/sex?defendant=true&') } else { res.redirect('https://cmc-prototype-pc.herokuapp.com/prototypes/prototype-may-2019/dashboard/new-dashboard/defendant/all-claims') } @@ -32,9 +32,9 @@ router.post('/claimant-disability-answer', function (req, res) { let disabilityInformation = req.session.data['disability-information'] if (disabilityInformation == 'Yes') { - res.redirect('/disability/disability-yes?defendant=false') + res.redirect('/disability/disability-yes?defendant=false&') } else { - res.redirect('/pregnancy?defendant=false') + res.redirect('/pregnancy?defendant=false&') } }) @@ -43,9 +43,9 @@ router.post('/defendant-disability-answer', function (req, res) { let disabilityInformation = req.session.data['disability-information'] if (disabilityInformation == 'Yes') { - res.redirect('/disability/disability-yes?defendant=true') + res.redirect('/disability/disability-yes?defendant=true&') } else { - res.redirect('/pregnancy?defendant=true') + res.redirect('/pregnancy?defendant=true&') } }) @@ -55,10 +55,10 @@ router.post('/claimant-disability-details', function (req, res) { let disabilityYes = req.session.data['disability-yes'] if (disabilityYes == 'Yes, limited a little' || disabilityYes == 'Yes, limited a lot') { - res.redirect('/disability/disability-yes-detail?defendant=false') + res.redirect('/disability/disability-yes-detail?defendant=false&') } else { - res.redirect('/pregnancy?defendant=false') + res.redirect('/pregnancy?defendant=false&') } }) @@ -68,10 +68,10 @@ router.post('/defendant-disability-details', function (req, res) { let disabilityYes = req.session.data['disability-yes'] if (disabilityYes == 'Yes, limited a little' || disabilityYes == 'Yes, limited a lot') { - res.redirect('/disability/disability-yes-detail?defendant=true') + res.redirect('/disability/disability-yes-detail?defendant=true&') } else { - res.redirect('/pregnancy?defendant=true') + res.redirect('/pregnancy?defendant=true&') } }) @@ -80,19 +80,19 @@ router.post('/defendant-ethnicity-answer', function (req, res) { let ethnicGroup = req.session.data['ethnic-group'] if (ethnicGroup == "Prefer not to say") { - res.redirect('pregnancy?defendant=true') + res.redirect('pregnancy?defendant=true&') } else if (ethnicGroup == "White") { - res.redirect('ethnic-group/ethnicity-white?defendant=true') + res.redirect('ethnic-group/ethnicity-white?defendant=true&') } else if (ethnicGroup == "Mixed or multiple ethnic groups") { - res.redirect('ethnic-group/ethnicity-mixed?defendant=true') + res.redirect('ethnic-group/ethnicity-mixed?defendant=true&') } else if (ethnicGroup == "Asian or Asian British") { - res.redirect('ethnic-group/ethnicity-asian?defendant=true') + res.redirect('ethnic-group/ethnicity-asian?defendant=true&') } else if (ethnicGroup == "Black, African, Black British or Caribbean") { - res.redirect('ethnic-group/ethnicity-black?defendant=true') + res.redirect('ethnic-group/ethnicity-black?defendant=true&') } else if (ethnicGroup == "Another ethnic group") { - res.redirect('ethnic-group/ethnicity-another?defendant=true') + res.redirect('ethnic-group/ethnicity-another?defendant=true&') } else { - res.redirect('pregnancy?defendant=true') + res.redirect('pregnancy?defendant=true&') } }) @@ -101,19 +101,19 @@ router.post('/claimant-ethnicity-answer', function (req, res) { let ethnicGroup = req.session.data['ethnic-group'] if (ethnicGroup == "Prefer not to say") { - res.redirect('pregnancy?defendant=false') + res.redirect('pregnancy?defendant=false&') } else if (ethnicGroup == "White") { - res.redirect('ethnic-group/ethnicity-white?defendant=false') + res.redirect('ethnic-group/ethnicity-white?defendant=false&') } else if (ethnicGroup == "Mixed or multiple ethnic groups") { - res.redirect('ethnic-group/ethnicity-mixed?defendant=false') + res.redirect('ethnic-group/ethnicity-mixed?defendant=false&') } else if (ethnicGroup == "Asian or Asian British") { - res.redirect('ethnic-group/ethnicity-asian?defendant=false') + res.redirect('ethnic-group/ethnicity-asian?defendant=false&') } else if (ethnicGroup == "Black, African, Black British or Caribbean") { - res.redirect('ethnic-group/ethnicity-black?defendant=false') + res.redirect('ethnic-group/ethnicity-black?defendant=false&') } else if (ethnicGroup == "Another ethnic group") { - res.redirect('ethnic-group/ethnicity-another?defendant=false') + res.redirect('ethnic-group/ethnicity-another?defendant=false&') } else { - res.redirect('pregnancy?defendant=false') + res.redirect('pregnancy?defendant=false&') } }) @@ -123,15 +123,15 @@ router.post('/defendant-ethnicity-answer-reduced', function (req, res) { if (ethnicGroup == "Prefer not to say") { res.redirect('https://cmc-prototype-pc.herokuapp.com/prototypes/prototype-may-2019/defendant/task-list?confirm_details=complete&') } else if (ethnicGroup == "White") { - res.redirect('ethnic-group/ethnicity-white?defendant=true') + res.redirect('ethnic-group/ethnicity-white?defendant=true&') } else if (ethnicGroup == "Mixed or multiple ethnic groups") { - res.redirect('ethnic-group/ethnicity-mixed?defendant=true') + res.redirect('ethnic-group/ethnicity-mixed?defendant=true&') } else if (ethnicGroup == "Asian or Asian British") { - res.redirect('ethnic-group/ethnicity-asian?defendant=true') + res.redirect('ethnic-group/ethnicity-asian?defendant=true&') } else if (ethnicGroup == "Black, African, Black British or Caribbean") { - res.redirect('ethnic-group/ethnicity-black?defendant=true') + res.redirect('ethnic-group/ethnicity-black?defendant=true&') } else if (ethnicGroup == "Another ethnic group") { - res.redirect('ethnic-group/ethnicity-another?defendant=true') + res.redirect('ethnic-group/ethnicity-another?defendant=true&') } else { res.redirect('https://cmc-prototype-pc.herokuapp.com/prototypes/prototype-may-2019/defendant/task-list?confirm_details=complete&') } @@ -142,15 +142,15 @@ router.post('/claimant-ethnicity-answer-reduced', function (req, res) { if (ethnicGroup == "Prefer not to say") { res.redirect('https://cmc-prototype-pc.herokuapp.com/prototypes/prototype-may-2019/claimant/task-list?your_details=complete&') } else if (ethnicGroup == "White") { - res.redirect('ethnic-group/ethnicity-white?defendant=false') + res.redirect('ethnic-group/ethnicity-white?defendant=false&') } else if (ethnicGroup == "Mixed or multiple ethnic groups") { - res.redirect('ethnic-group/ethnicity-mixed?defendant=false') + res.redirect('ethnic-group/ethnicity-mixed?defendant=false&') } else if (ethnicGroup == "Asian or Asian British") { - res.redirect('ethnic-group/ethnicity-asian?defendant=false') + res.redirect('ethnic-group/ethnicity-asian?defendant=false&') } else if (ethnicGroup == "Black, African, Black British or Caribbean") { res.redirect('ethnic-group/ethnicity-black?defendant=fasle') } else if (ethnicGroup == "Another ethnic group") { - res.redirect('ethnic-group/ethnicity-another?defendant=false') + res.redirect('ethnic-group/ethnicity-another?defendant=false&') } else { res.redirect('https://cmc-prototype-pc.herokuapp.com/prototypes/prototype-may-2019/claimant/task-list?your_details=complete&') } @@ -163,10 +163,10 @@ router.post('/defendant-english-first-language', function (req, res) { let language = req.session.data['english-language'] if (language == 'Other') { - res.redirect('/english-level?defendant=true') + res.redirect('/english-level?defendant=true&') } else { - res.redirect('/religion?defendant=true') + res.redirect('/religion?defendant=true&') } }) @@ -175,10 +175,10 @@ router.post('/claimant-english-first-language', function (req, res) { let language = req.session.data['english-language'] if (language == 'Other') { - res.redirect('/english-level?defendant=false') + res.redirect('/english-level?defendant=false&') } else { - res.redirect('/religion?defendant=false') + res.redirect('/religion?defendant=false&') } }) diff --git a/app/views/gender.html b/app/views/gender.html index d0363713..a2d692c9 100644 --- a/app/views/gender.html +++ b/app/views/gender.html @@ -19,7 +19,7 @@