From fc9ff2e6e09a742ddeb5eb44af44a77edb6c5442 Mon Sep 17 00:00:00 2001 From: Kat Date: Tue, 2 May 2023 10:46:58 +0100 Subject: [PATCH] Update validation message: income --- app/models/form/sales/pages/buyer1_income_value_check.rb | 7 +++++-- app/models/form/sales/pages/buyer2_income_value_check.rb | 7 +++++-- config/locales/en.yml | 4 +++- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/app/models/form/sales/pages/buyer1_income_value_check.rb b/app/models/form/sales/pages/buyer1_income_value_check.rb index 776debc75..4394258e6 100644 --- a/app/models/form/sales/pages/buyer1_income_value_check.rb +++ b/app/models/form/sales/pages/buyer1_income_value_check.rb @@ -7,7 +7,7 @@ class Form::Sales::Pages::Buyer1IncomeValueCheck < ::Form::Page }, ] @title_text = { - "translation" => "soft_validations.income.under_soft_min_for_economic_status", + "translation" => "soft_validations.income.under_soft_min_for_economic_status.title_text", "arguments" => [ { "key" => "field_formatted_as_currency", @@ -21,7 +21,10 @@ class Form::Sales::Pages::Buyer1IncomeValueCheck < ::Form::Page }, ], } - @informative_text = {} + @informative_text = { + "translation" => "soft_validations.income.under_soft_min_for_economic_status.hint_text", + "arguments" => [], + } end def questions diff --git a/app/models/form/sales/pages/buyer2_income_value_check.rb b/app/models/form/sales/pages/buyer2_income_value_check.rb index 2a3b389c7..a3f7c2541 100644 --- a/app/models/form/sales/pages/buyer2_income_value_check.rb +++ b/app/models/form/sales/pages/buyer2_income_value_check.rb @@ -10,7 +10,7 @@ class Form::Sales::Pages::Buyer2IncomeValueCheck < ::Form::Page }, ] @title_text = { - "translation" => "soft_validations.income.under_soft_min_for_economic_status", + "translation" => "soft_validations.income.under_soft_min_for_economic_status.title_text", "arguments" => [ { "key" => "field_formatted_as_currency", @@ -24,7 +24,10 @@ class Form::Sales::Pages::Buyer2IncomeValueCheck < ::Form::Page }, ], } - @informative_text = {} + @informative_text = { + "translation" => "soft_validations.income.under_soft_min_for_economic_status.hint_text", + "arguments" => [], + } end def questions diff --git a/config/locales/en.yml b/config/locales/en.yml index 6b8a16bab..585419d87 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -525,7 +525,9 @@ en: in_soft_max_range: message: "Net income is higher than expected based on the lead tenant’s working situation. Are you sure this is correct?" income: - under_soft_min_for_economic_status: "You said income was %{income}, which is below this working situation's minimum (%{minimum})" + under_soft_min_for_economic_status: + title_text: "You told us income was %{income}." + hint_text: "This is less than we would expect for someone in this working situation." rent: outside_range_title: "You told us the rent is %{brent}" min_hint_text: "The minimum rent expected for this type of property in this local authority is %{soft_min_for_period}."