diff --git a/app/models/form/sales/pages/outright_ownership_type.rb b/app/models/form/sales/pages/outright_ownership_type.rb index 099b45d07..1361bf27f 100644 --- a/app/models/form/sales/pages/outright_ownership_type.rb +++ b/app/models/form/sales/pages/outright_ownership_type.rb @@ -16,6 +16,6 @@ class Form::Sales::Pages::OutrightOwnershipType < ::Form::Page end def header - "Type of outright sale" if form.start_date.year >= 2023 + "Type of outright sale page" if form.start_date.year >= 2023 end end diff --git a/app/models/form/sales/questions/ownership_scheme.rb b/app/models/form/sales/questions/ownership_scheme.rb index 9fabb49dc..770040e5e 100644 --- a/app/models/form/sales/questions/ownership_scheme.rb +++ b/app/models/form/sales/questions/ownership_scheme.rb @@ -2,8 +2,9 @@ class Form::Sales::Questions::OwnershipScheme < ::Form::Question def initialize(id, hsh, page) super @id = "ownershipsch" - @check_answer_label = "Purchase made under ownership scheme" - @header = "Was this purchase made through an ownership scheme?" + @check_answer_label = I18n.t("forms.#{form.start_date.year}.sales.setup.ownerschipsch.check_answer_label") + @header = I18n.t("forms.#{form.start_date.year}.sales.setup.ownerschipsch.question_text") + @hint_text = I18n.t("forms.#{form.start_date.year}.sales.setup.ownerschipsch.hint_text") @type = "radio" @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] end diff --git a/app/models/form/sales/questions/purchaser_code.rb b/app/models/form/sales/questions/purchaser_code.rb index 12ff7f1de..03f88a936 100644 --- a/app/models/form/sales/questions/purchaser_code.rb +++ b/app/models/form/sales/questions/purchaser_code.rb @@ -2,9 +2,9 @@ class Form::Sales::Questions::PurchaserCode < ::Form::Question def initialize(id, hsh, page) super @id = "purchid" - @check_answer_label = "Purchaser code" - @header = "What is the purchaser code?" - @hint_text = "This is how you usually refer to the purchaser on your own systems." + @check_answer_label = I18n.t("forms.#{form.start_date.year}.sales.setup.purchid.check_answer_label") + @header = I18n.t("forms.#{form.start_date.year}.sales.setup.purchid.question_text") + @hint_text = I18n.t("forms.#{form.start_date.year}.sales.setup.purchid.hint_text") @type = "text" @width = 10 @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] diff --git a/app/models/form/sales/questions/sale_date.rb b/app/models/form/sales/questions/sale_date.rb index ae02f1cfd..d850f8904 100644 --- a/app/models/form/sales/questions/sale_date.rb +++ b/app/models/form/sales/questions/sale_date.rb @@ -2,8 +2,9 @@ class Form::Sales::Questions::SaleDate < ::Form::Question def initialize(id, hsh, page) super @id = "saledate" - @check_answer_label = "Sale completion date" - @header = "What is the sale completion date?" + @check_answer_label = I18n.t("forms.#{form.start_date.year}.sales.setup.saledate.check_answer_label") + @header = I18n.t("forms.#{form.start_date.year}.sales.setup.saledate.question_text") + @hint_text = I18n.t("forms.#{form.start_date.year}.sales.setup.saledate.hint_text") @type = "date" @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] end diff --git a/app/views/form/_date_question.html.erb b/app/views/form/_date_question.html.erb index 1be21d212..aded6f3b3 100644 --- a/app/views/form/_date_question.html.erb +++ b/app/views/form/_date_question.html.erb @@ -3,7 +3,7 @@ <%= f.govuk_date_field question.id.to_sym, caption: caption(caption_text, page_header, conditional), legend: legend(question, page_header, conditional), - hint: { text: (question.hint_text.nil? ? "" : (question.hint_text.html_safe + "

".html_safe)) + "For example, #{date_mid_collection_year_formatted(@log.startdate)}" }, + hint: { text: (question.hint_text.blank? ? "" : (question.hint_text.html_safe + "

".html_safe)) + "For example, #{date_mid_collection_year_formatted(@log.startdate)}" }, width: 20, **stimulus_html_attributes(question) do %> <%= govuk_inset_text(text: question.unresolved_hint_text) if question.unresolved_hint_text.present? && @log.unresolved %> diff --git a/config/locales/forms/2024/sales/setup.en.yml b/config/locales/forms/2024/sales/setup.en.yml index b5fcfc7d6..7e6f8878b 100644 --- a/config/locales/forms/2024/sales/setup.en.yml +++ b/config/locales/forms/2024/sales/setup.en.yml @@ -18,4 +18,22 @@ en: hint_text: "" question_text: "Which user are you creating this log for?" + saledate: + check_answer_label: "Sale completion date" + hint_text: "" + question_text: "What is the sale completion date?" + + purchid: + check_answer_label: "Purchaser code" + hint_text: "This is how you usually refer to the purchaser on your own systems." + question_text: "What is the purchaser code?" + + ownerschipsch: + check_answer_label: "Purchase made under ownership scheme" + hint_text: "" + question_text: "Was this purchase made through an ownership scheme?" + + type: + shared_ownership: +