From aae45fdf18daeb2453147c3839cb9ccd059d75a2 Mon Sep 17 00:00:00 2001 From: Paul Robert Lloyd Date: Wed, 19 Jan 2022 13:52:05 +0000 Subject: [PATCH 1/5] =?UTF-8?q?Consistent=20location/appearance=20of=20som?= =?UTF-8?q?e=20=E2=80=98or=E2=80=99=20dividers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/forms/2021_2022.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/config/forms/2021_2022.json b/config/forms/2021_2022.json index 2243e23f2..38d771a9d 100644 --- a/config/forms/2021_2022.json +++ b/config/forms/2021_2022.json @@ -873,8 +873,8 @@ "28": "Death of household member in last settled accomodation", "29": "Discharged from prison", "30": "Discharged from long stay hospital or similar institution", - "divider": true, "31": "Other", + "divider": true, "32": "Don’t know", "33": "Prefer not to say" }, @@ -1709,7 +1709,6 @@ "4": "Shared flat or maisonette", "5": "Shared house", "6": "Shared bungalow", - "divider": true, "7": "Other" } } @@ -1951,8 +1950,8 @@ "type": "radio", "answer_options": { "0": "Housing benefit", - "1": "Universal Credit with housing element (excluding housing benefit)", "2": "Housing benefit and Universal Credit (without housing element)", + "1": "Universal Credit with housing element (excluding housing benefit)", "3": "Universal Credit (without housing element)", "4": "None", "divider": true, From 5a053c4bdb3b417c0a2983b6426f5f73c434ad32 Mon Sep 17 00:00:00 2001 From: Paul Robert Lloyd Date: Wed, 19 Jan 2022 13:52:26 +0000 Subject: [PATCH 2/5] Fix unclosed dt element on check your answers table --- app/views/form/_check_answers_table.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/form/_check_answers_table.html.erb b/app/views/form/_check_answers_table.html.erb index 8d58e35c0..0ba792f1f 100644 --- a/app/views/form/_check_answers_table.html.erb +++ b/app/views/form/_check_answers_table.html.erb @@ -1,7 +1,7 @@
<%= question.check_answer_label.to_s.present? ? question.check_answer_label.to_s : question.header.to_s %> -
+
<%= get_answer_label(question, @case_log) %>
<% question.get_inferred_answers(@case_log).each do |inferred_answer| %> From 98cab558d980e9b2e5595adf70d46b498da66336 Mon Sep 17 00:00:00 2001 From: Paul Robert Lloyd Date: Wed, 19 Jan 2022 13:52:41 +0000 Subject: [PATCH 3/5] Content update for income --- app/views/form/guidance/_what_counts_as_income.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/form/guidance/_what_counts_as_income.html.erb b/app/views/form/guidance/_what_counts_as_income.html.erb index 0ca777ea4..79326d909 100644 --- a/app/views/form/guidance/_what_counts_as_income.html.erb +++ b/app/views/form/guidance/_what_counts_as_income.html.erb @@ -1,5 +1,5 @@ <%= govuk_details(summary_text: 'What counts as income?') do %> -

You should include any income from:

+

You should include any income after tax from:

  • employment
  • pensions
  • From d8a473176145d3183f9b49a7633c35dfe07491d3 Mon Sep 17 00:00:00 2001 From: Paul Robert Lloyd Date: Wed, 19 Jan 2022 14:07:35 +0000 Subject: [PATCH 4/5] Include log id in breadcrumb --- app/views/case_logs/edit.html.erb | 6 ++++-- app/views/form/check_answers.html.erb | 7 +++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/app/views/case_logs/edit.html.erb b/app/views/case_logs/edit.html.erb index 0d5dfc2b8..7b5f868d7 100644 --- a/app/views/case_logs/edit.html.erb +++ b/app/views/case_logs/edit.html.erb @@ -1,6 +1,8 @@ <% content_for :title, "Log #{@case_log.id}" %> -<% breadcrumbs = { "Logs" => "/logs", content_for(:title) => "" } %> -<% content_for :breadcrumbs, govuk_breadcrumbs(breadcrumbs: breadcrumbs) %> +<% content_for :breadcrumbs, govuk_breadcrumbs(breadcrumbs: { + "Logs" => "/logs", + content_for(:title) => "" +}) %> <%= turbo_frame_tag "case_log_form", target: "_top" do %>
    diff --git a/app/views/form/check_answers.html.erb b/app/views/form/check_answers.html.erb index f3d1355a5..cc3711b5b 100644 --- a/app/views/form/check_answers.html.erb +++ b/app/views/form/check_answers.html.erb @@ -1,6 +1,9 @@ <% content_for :title, "#{subsection.id.humanize} - Check your answers" %> -<% breadcrumbs = { "Logs" => "/logs", "Log" => "/logs/" + @case_log.id.to_s, subsection.label => "" } %> -<% content_for :breadcrumbs, govuk_breadcrumbs(breadcrumbs: breadcrumbs) %> +<% content_for :breadcrumbs, govuk_breadcrumbs(breadcrumbs: { + "Logs" => "/logs", + "Log #{@case_log.id.to_s}" => "/logs/" + @case_log.id.to_s, + subsection.label => "" +}) %> <%= turbo_frame_tag "case_log_form", target: "_top" do %>
    From 52179fc80bff118c5e906cdcd8ac50666db21ee0 Mon Sep 17 00:00:00 2001 From: Paul Robert Lloyd Date: Wed, 19 Jan 2022 14:16:20 +0000 Subject: [PATCH 5/5] Use smart punctuation --- app/models/constants/case_log.rb | 8 +++---- config/forms/2021_2022.json | 8 +++---- config/locales/en.yml | 12 +++++----- spec/features/form/check_answers_page_spec.rb | 2 +- spec/fixtures/forms/2021_2022.json | 24 +++++++++---------- spec/fixtures/forms/test_validator.json | 4 ++-- 6 files changed, 29 insertions(+), 29 deletions(-) diff --git a/app/models/constants/case_log.rb b/app/models/constants/case_log.rb index c4eab5674..d55c85355 100644 --- a/app/models/constants/case_log.rb +++ b/app/models/constants/case_log.rb @@ -248,9 +248,9 @@ module Constants::CaseLog "Other problems with neighbours" => 11, "Property unsuitable because of overcrowding" => 12, "End of assured shorthold tenancy - no fault" => 40, - "End of assured shorthold tenancy - tenant's fault" => 41, + "End of assured shorthold tenancy - tenant’s fault" => 41, "End of fixed term tenancy - no fault" => 42, - "End of fixed term tenancy - tenant's fault" => 43, + "End of fixed term tenancy - tenant’s fault" => 43, "Repossession" => 34, "Under occupation - offered incentive to downsize" => 29, "Under occupation - no incentive" => 30, @@ -417,7 +417,7 @@ module Constants::CaseLog "Islington" => "E09000019", "Kensington and Chelsea" => "E09000020", "Kettering" => "E07000153", - "King's Lynn and West Norfolk" => "E07000146", + "King’s Lynn and West Norfolk" => "E07000146", "Kingston upon Hull, City of" => "E06000010", "Kingston upon Thames" => "E09000021", "Kirklees" => "E08000034", @@ -769,7 +769,7 @@ module Constants::CaseLog "Islington" => "E09000019", "Kensington and Chelsea" => "E09000020", "Kettering" => "E07000153", - "King's Lynn and West Norfolk" => "E07000146", + "King’s Lynn and West Norfolk" => "E07000146", "Kingston upon Hull, City of" => "E06000010", "Kingston upon Thames" => "E09000021", "Kirklees" => "E08000034", diff --git a/config/forms/2021_2022.json b/config/forms/2021_2022.json index 38d771a9d..7ceed21a5 100644 --- a/config/forms/2021_2022.json +++ b/config/forms/2021_2022.json @@ -1188,7 +1188,7 @@ }, "property_postcode": { "check_answer_label": "Postcode", - "header": "What is the property's postcode?", + "header": "What is the property’s postcode?", "hint_text": "", "type": "text", "width": 5, @@ -1370,7 +1370,7 @@ "E09000019": "Islington", "E09000020": "Kensington and Chelsea", "E07000153": "Kettering", - "E07000146": "King's Lynn and West Norfolk", + "E07000146": "King’s Lynn and West Norfolk", "E06000010": "Kingston upon Hull, City of", "E09000021": "Kingston upon Thames", "E08000034": "Kirklees", @@ -1967,7 +1967,7 @@ "questions": { "benefits": { "check_answer_label": "Household income from Universal credit, state pension or benefits", - "header": "How much of the household's income is from Universal Credit, state pensions or benefits?", + "header": "How much of the household’s income is from Universal Credit, state pensions or benefits?", "hint_text": "This excludes child and housing benefit, council tax support and tax credits.", "type": "radio", "answer_options": { @@ -2948,7 +2948,7 @@ "E09000019": "Islington", "E09000020": "Kensington and Chelsea", "E07000153": "Kettering", - "E07000146": "King's Lynn and West Norfolk", + "E07000146": "King’s Lynn and West Norfolk", "E06000010": "Kingston upon Hull, City of", "E09000021": "Kingston upon Thames", "E08000034": "Kirklees", diff --git a/config/locales/en.yml b/config/locales/en.yml index 3b7f95796..fd5690a4a 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -64,8 +64,8 @@ en: benefits: part_or_full_time: "income is from Universal Credit, state pensions or benefits cannot be All if the tenant or the partner works part or full time" earnings: - under_hard_max: "Net income cannot be greater than %{hard_max} given the tenant's working situation" - over_hard_min: "Net income cannot be less than %{hard_min} given the tenant's working situation" + under_hard_max: "Net income cannot be greater than %{hard_max} given the tenant’s working situation" + over_hard_min: "Net income cannot be less than %{hard_min} given the tenant’s working situation" household: reasonpref: @@ -92,7 +92,7 @@ en: child_under_16: "Tenant %{person_num} economic status must be Child under 16 if their age is under 16" student_16_19: "If age is between 16 and 19 - tenant %{person_num} must be a full time student or prefer not to say." relat: - child_under_16: "Tenant %{person_num}'s relationship to tenant 1 must be Child if their age is under 16" + child_under_16: "Tenant %{person_num}’s relationship to tenant 1 must be Child if their age is under 16" one_partner: "Number of partners cannot be greater than 1" housingneeds_a: one_or_two_choices: "Only one box must be ticked or 'other disabilities' plus one of mobility disabilities" @@ -109,8 +109,8 @@ en: soft_validations: net_income: - hint_text: "This is based on the tenant's work situation: %{ecstat1}" + hint_text: "This is based on the tenant’s work situation: %{ecstat1}" in_soft_min_range: - message: "Net income is lower than expected based on the main tenant's working situation. Are you sure this is correct?" + message: "Net income is lower than expected based on the main tenant’s working situation. Are you sure this is correct?" in_soft_max_range: - message: "Net income is higher than expected based on the main tenant's working situation. Are you sure this is correct?" + message: "Net income is higher than expected based on the main tenant’s working situation. Are you sure this is correct?" diff --git a/spec/features/form/check_answers_page_spec.rb b/spec/features/form/check_answers_page_spec.rb index 12c63feb7..577c1cdb8 100644 --- a/spec/features/form/check_answers_page_spec.rb +++ b/spec/features/form/check_answers_page_spec.rb @@ -44,7 +44,7 @@ RSpec.describe "Form Check Answers Page" do it "has question headings based on the subsection" do visit("/logs/#{id}/#{subsection}/check-answers") - question_labels = ["Tenant code", "Tenant's age", "Tenant's gender", "Number of Other Household Members"] + question_labels = ["Tenant code", "Tenant’s age", "Tenant’s gender", "Number of Other Household Members"] question_labels.each do |label| expect(page).to have_content(label) end diff --git a/spec/fixtures/forms/2021_2022.json b/spec/fixtures/forms/2021_2022.json index 356258eff..62fc65fbe 100644 --- a/spec/fixtures/forms/2021_2022.json +++ b/spec/fixtures/forms/2021_2022.json @@ -20,8 +20,8 @@ "person_1_age": { "questions": { "age1": { - "check_answer_label": "Tenant's age", - "header": "What is the tenant's age?", + "check_answer_label": "Tenant’s age", + "header": "What is the tenant’s age?", "type": "numeric", "min": 0, "max": 150, @@ -33,8 +33,8 @@ "person_1_gender": { "questions": { "sex1": { - "check_answer_label": "Tenant's gender", - "header": "Which of these best describes the tenant's gender identity?", + "check_answer_label": "Tenant’s gender", + "header": "Which of these best describes the tenant’s gender identity?", "type": "radio", "answer_options": { "0": "Female", @@ -64,8 +64,8 @@ } }, "relat2": { - "check_answer_label": "Person 2's relationship to lead tenant", - "header": "What's person 2's relationship to lead tenant", + "check_answer_label": "Person 2’s relationship to lead tenant", + "header": "What’s person 2’s relationship to lead tenant", "type": "radio", "answer_options": { "0": "Other", @@ -73,8 +73,8 @@ } }, "age2": { - "check_answer_label": "Person 2's age", - "header": "What's person 2's age", + "check_answer_label": "Person 2’s age", + "header": "What’s person 2’s age", "type": "numeric", "min": 0, "max": 150, @@ -82,8 +82,8 @@ "width": 2 }, "sex2": { - "check_answer_label": "Person 2's gender", - "header": "Which of these best describes person 2's gender identity?", + "check_answer_label": "Person 2’s gender", + "header": "Which of these best describes person 2’s gender identity?", "type": "radio", "answer_options": { "0": "Female", @@ -93,8 +93,8 @@ } }, "ecstat2": { - "check_answer_label": "Person 2's Work", - "header": "Which of these best describes person 2's working situation?", + "check_answer_label": "Person 2’s Work", + "header": "Which of these best describes person 2’s working situation?", "type": "radio", "answer_options": { "0": "Other", diff --git a/spec/fixtures/forms/test_validator.json b/spec/fixtures/forms/test_validator.json index 2af164aee..cbb64f2f3 100644 --- a/spec/fixtures/forms/test_validator.json +++ b/spec/fixtures/forms/test_validator.json @@ -29,8 +29,8 @@ "description": "", "questions": { "person_1_age": { - "check_answer_label": "Tenant's age", - "header": "What is the tenant's age?", + "check_answer_label": "Tenant’s age", + "header": "What is the tenant’s age?", "hint_text": "", "type": "numeric", "min": 0,