@ -2,10 +2,7 @@ class Form::Sales::Questions::ArmedForces < ::Form::Question
definitialize(id,hsh,page)
definitialize(id,hsh,page)
super
super
@id="hhregres"
@id="hhregres"
@check_answer_label="Have any of the buyers ever served as a regular in the UK armed forces?"
@header="Have any of the buyers ever served as a regular in the UK armed forces?"
@type="radio"
@type="radio"
@hint_text="A regular is somebody who has served in the Royal Navy, the Royal Marines, the Royal Airforce or Army full time and does not include reserve forces"
<li>If you are using the new template, keep the headers. If you are using the legacy template, you can either keep or remove the headers. If you remove the headers, you should also remove the blank column A.</li>
<li>If you are using the new template, keep the headers. If you are using the legacy template, you can either keep or remove the headers. If you remove the headers, you should also remove the blank column A.</li>
</ul>
</ul>
<%= govuk_inset_text(text: "You can upload both general needs and supported housing logs in the same file for 2023/24 data.") %>
<%= govuk_inset_text(text: "You can upload both general needs and supported housing logs in the same file for 2023 to 2024 data.") %>
<span class="govuk-caption-l">Bulk upload for lettings (<%= @bulk_upload.year_combo %>)</span>
<span class="govuk-caption-l">Upload lettings logs in bulk (<%= @bulk_upload.year_combo %>)</span>
<h1 class="govuk-heading-l">You need to fix logs from your bulk upload</h1>
<h1 class="govuk-heading-l">You need to fix logs from your bulk upload</h1>
<p class="govuk-body">You have chosen to create logs from your recent bulk upload. To view and complete these logs, return to the list of lettings logs.</p>
<p class="govuk-body">You have chosen to create logs from your recent bulk upload. To view and complete these logs, return to the list of lettings logs.</p>
<span class="govuk-caption-l">Bulk upload for sales (<%= @bulk_upload.year_combo %>)</span>
<span class="govuk-caption-l">Upload sales logs in bulk (<%= @bulk_upload.year_combo %>)</span>
<h1 class="govuk-heading-l">You need to fix logs from your bulk upload</h1>
<h1 class="govuk-heading-l">You need to fix logs from your bulk upload</h1>
<p class="govuk-body">You have chosen to create logs from your recent bulk upload. To view and complete these logs, return to the list of sales logs.</p>
<p class="govuk-body">You have chosen to create logs from your recent bulk upload. To view and complete these logs, return to the list of sales logs.</p>
"Enter a date within the %{current_start_year_short}/%{current_end_year_short} collection year, which is between %{current_start_year_long} and %{current_end_year_long}."
"Enter a date within the %{current_start_year_short} to %{current_end_year_short} collection year, which is between %{current_start_year_long} and %{current_end_year_long}."
previous_and_current_collection_year:
previous_and_current_collection_year:
"Enter a date within the %{previous_start_year_short}/%{previous_end_year_short} or %{previous_end_year_short}/%{current_end_year_short} collection years, which is between %{previous_start_year_long} and %{current_end_year_long}."
"Enter a date within the %{previous_start_year_short} to %{previous_end_year_short} or %{previous_end_year_short} to %{current_end_year_short} collection years, which is between %{previous_start_year_long} and %{current_end_year_long}."
later_than_14_days_after:"The tenancy start date must not be later than 14 days from today’s date."
later_than_14_days_after:"The tenancy start date must not be later than 14 days from today’s date."
before_scheme_end_date:"The tenancy start date must be before the end date for this supported housing scheme."
before_scheme_end_date:"The tenancy start date must be before the end date for this supported housing scheme."
after_void_date:"Enter a tenancy start date that is after the void date."
after_void_date:"Enter a tenancy start date that is after the void date."
@ -745,8 +745,6 @@ Make sure these answers are correct."
grant:
grant:
title_text:"You told us that the grant amount is %{grant}."
title_text:"You told us that the grant amount is %{grant}."
hint_text:"Loans, grants and subsidies are usually between £9,000 and £16,000."
hint_text:"Loans, grants and subsidies are usually between £9,000 and £16,000."
wheelchair:
title_text:"You told us that someone in the household uses a wheelchair."
referral:
referral:
title_text:"Are you sure?"
title_text:"Are you sure?"
hint_text:"This is a general needs log, and this referral type is for supported housing."
hint_text:"This is a general needs log, and this referral type is for supported housing."
check_answer_label:"Have any of the buyers ever served as a regular in the UK armed forces?"
hint_text:"A regular is somebody who has served in the Royal Navy, the Royal Marines, the Royal Airforce or Army full time and does not include reserve forces"
question_text:"Have any of the buyers ever served as a regular in the UK armed forces?"
hhregresstill:
page_header:""
check_answer_label:"Are they still serving in the UK armed forces?"
hint_text:""
question_text:"Is the buyer still serving in the UK armed forces?"
armedforcesspouse:
page_header:""
check_answer_label:"Are any of the buyers a spouse or civil partner of a UK armed forces regular who died in service within the last 2 years?"
hint_text:""
question_text:"Are any of the buyers a spouse or civil partner of a UK armed forces regular who died in service within the last 2 years?"
disabled:
page_header:""
check_answer_label:"Does anyone in the household have a disability?"
hint_text:"This includes any long-term health condition that has an impact on the person's day-to-day life"
question_text:"Does anyone in the household consider themselves to have a disability?"
wheel:
page_header:""
check_answer_label:"Does anyone in the household use a wheelchair?"
hint_text:"This can be inside or outside the home"
question_text:"Does anyone in the household use a wheelchair?"
check_answer_label:"Have any of the buyers ever served as a regular in the UK armed forces?"
hint_text:"A regular is somebody who has served in the Royal Navy, the Royal Marines, the Royal Airforce or Army full time and does not include reserve forces"
question_text:"Have any of the buyers ever served as a regular in the UK armed forces?"
hhregresstill:
page_header:""
check_answer_label:"Are they still serving in the UK armed forces?"
hint_text:""
question_text:"Is the buyer still serving in the UK armed forces?"
armedforcesspouse:
page_header:""
check_answer_label:"Are any of the buyers a spouse or civil partner of a UK armed forces regular who died in service within the last 2 years?"
hint_text:""
question_text:"Are any of the buyers a spouse or civil partner of a UK armed forces regular who died in service within the last 2 years?"
disabled:
page_header:""
check_answer_label:"Does anyone in the household have a disability?"
hint_text:"This includes any long-term health condition that has an impact on the person's day-to-day life"
question_text:"Does anyone in the household consider themselves to have a disability?"
wheel:
page_header:""
check_answer_label:"Does anyone in the household use a wheelchair?"
hint_text:"This can be inside or outside the home"
question_text:"Does anyone in the household use a wheelchair?"
next_two_weeks:"Sale completion date must not be later than 14 days from today’s date."
next_two_weeks:"Sale completion date must not be later than 14 days from today’s date."
must_be_within:
must_be_within:
current_collection_year:
current_collection_year:
"Enter a date within the %{current_start_year_short}/%{current_end_year_short} collection year, which is between %{current_start_year_long} and %{current_end_year_long}."
"Enter a date within the %{current_start_year_short} to %{current_end_year_short} collection year, which is between %{current_start_year_long} and %{current_end_year_long}."
previous_and_current_collection_year:
previous_and_current_collection_year:
"Enter a date within the %{previous_start_year_short}/%{previous_end_year_short} or %{previous_end_year_short}/%{current_end_year_short} collection years, which is between %{previous_start_year_long} and %{current_end_year_long}."
"Enter a date within the %{previous_start_year_short} to %{previous_end_year_short} or %{previous_end_year_short} to %{current_end_year_short} collection years, which is between %{previous_start_year_long} and %{current_end_year_long}."
invalid:
invalid:
merged_organisations:
merged_organisations:
"Enter a date when the owning organisation was active. %{owning_organisation} became inactive on %{merge_date} and was replaced by %{absorbing_organisation}."
"Enter a date when the owning organisation was active. %{owning_organisation} became inactive on %{merge_date} and was replaced by %{absorbing_organisation}."
expect(record.errors[:saledate]).toinclude(/Enter a date within the \d{2}\/\d{2} collection year, which is between 1st April \d{4} and 31st March \d{4}/)
expect(record.errors[:saledate]).toinclude(/Enter a date within the \d{4} to \d{4} collection year, which is between 1st April \d{4} and 31st March \d{4}/)
end
end
end
end
@ -47,7 +47,7 @@ RSpec.describe Validations::Sales::SetupValidations do
expect(record.errors[:saledate]).toinclude(/Enter a date within the \d{2}\/\d{2} collection year, which is between 1st April \d{4} and 31st March \d{4}/)
expect(record.errors[:saledate]).toinclude(/Enter a date within the \d{4} to \d{4} collection year, which is between 1st April \d{4} and 31st March \d{4}/)
end
end
end
end
end
end
@ -91,7 +91,7 @@ RSpec.describe Validations::Sales::SetupValidations do
expect(record.errors[:saledate]).toinclude("Enter a date within the 23/24 or 24/25 collection years, which is between 1st April 2023 and 31st March 2025.")
expect(record.errors[:saledate]).toinclude("Enter a date within the 2023 to 2024 or 2024 to 2025 collection years, which is between 1st April 2023 and 31st March 2025.")
end
end
end
end
@ -105,7 +105,7 @@ RSpec.describe Validations::Sales::SetupValidations do
expect(record.errors[:saledate]).toinclude("Enter a date within the 23/24 or 24/25 collection years, which is between 1st April 2023 and 31st March 2025.")
expect(record.errors[:saledate]).toinclude("Enter a date within the 2023 to 2024 or 2024 to 2025 collection years, which is between 1st April 2023 and 31st March 2025.")
end
end
end
end
@ -119,7 +119,7 @@ RSpec.describe Validations::Sales::SetupValidations do
it"cannot create new logs for the archived collection year"do
it"cannot create new logs for the archived collection year"do
expect(record.errors["saledate"]).toinclude(match"Enter a date within the 23/24 or 24/25 collection years, which is between 1st April 2023 and 31st March 2025.")
expect(record.errors["saledate"]).toinclude(match"Enter a date within the 2023 to 2024 or 2024 to 2025 collection years, which is between 1st April 2023 and 31st March 2025.")
end
end
it"can edit already created logs for the previous collection year"do
it"can edit already created logs for the previous collection year"do
@ -127,7 +127,7 @@ RSpec.describe Validations::Sales::SetupValidations do
expect(record.errors["saledate"]).not_toinclude(match"Enter a date within the 24/25 collection year, which is between 1st April 2024 and 31st March 2025.")
expect(record.errors["saledate"]).not_toinclude(match"Enter a date within the 2024 to 2025 collection year, which is between 1st April 2024 and 31st March 2025.")
end
end
end
end
@ -142,7 +142,7 @@ RSpec.describe Validations::Sales::SetupValidations do
expect(record.errors["saledate"]).toinclude(match"Enter a date within the 23/24 or 24/25 collection years, which is between 1st April 2023 and 31st March 2025.")
expect(record.errors["saledate"]).toinclude(match"Enter a date within the 2023 to 2024 or 2024 to 2025 collection years, which is between 1st April 2023 and 31st March 2025.")
end
end
it"cannot edit already created logs for the archived collection year"do
it"cannot edit already created logs for the archived collection year"do
@ -150,7 +150,7 @@ RSpec.describe Validations::Sales::SetupValidations do
expect(record.errors["saledate"]).toinclude(match"Enter a date within the 23/24 or 24/25 collection years, which is between 1st April 2023 and 31st March 2025.")
expect(record.errors["saledate"]).toinclude(match"Enter a date within the 2023 to 2024 or 2024 to 2025 collection years, which is between 1st April 2023 and 31st March 2025.")
expect(record.errors["startdate"]).toinclude(match"Enter a date within the 21/22 or 22/23 collection years, which is between 1st April 2021 and 31st March 2023")
expect(record.errors["startdate"]).toinclude(match"Enter a date within the 2021 to 2022 or 2022 to 2023 collection years, which is between 1st April 2021 and 31st March 2023")
end
end
it"cannot be after the second collection window end date"do
it"cannot be after the second collection window end date"do
expect(record.errors["startdate"]).toinclude(match"Enter a date within the 21/22 or 22/23 collection years, which is between 1st April 2021 and 31st March 2023")
expect(record.errors["startdate"]).toinclude(match"Enter a date within the 2021 to 2022 or 2022 to 2023 collection years, which is between 1st April 2021 and 31st March 2023")
end
end
end
end
@ -39,19 +39,19 @@ RSpec.describe Validations::SetupValidations do
expect(record.errors["startdate"]).toinclude(match"Enter a date within the 22/23 collection year, which is between 1st April 2022 and 31st March 2023")
expect(record.errors["startdate"]).toinclude(match"Enter a date within the 2022 to 2023 collection year, which is between 1st April 2022 and 31st March 2023")
end
end
it"cannot be after the second collection window end date"do
it"cannot be after the second collection window end date"do
expect(record.errors["startdate"]).toinclude(match"Enter a date within the 22/23 collection year, which is between 1st April 2022 and 31st March 2023")
expect(record.errors["startdate"]).toinclude(match"Enter a date within the 2022 to 2023 collection year, which is between 1st April 2022 and 31st March 2023")
expect(record.errors["startdate"]).toinclude(match"Enter a date within the 22/23 or 23/24 collection years, which is between 1st April 2022 and 31st March 2024")
expect(record.errors["startdate"]).toinclude(match"Enter a date within the 2022 to 2023 or 2023 to 2024 collection years, which is between 1st April 2022 and 31st March 2024")
end
end
it"cannot be after the second collection window end date"do
it"cannot be after the second collection window end date"do
expect(record.errors["startdate"]).toinclude(match"Enter a date within the 22/23 or 23/24 collection years, which is between 1st April 2022 and 31st March 2024")
expect(record.errors["startdate"]).toinclude(match"Enter a date within the 2022 to 2023 or 2023 to 2024 collection years, which is between 1st April 2022 and 31st March 2024")
end
end
end
end
@ -83,14 +83,14 @@ RSpec.describe Validations::SetupValidations do
expect(record.errors["startdate"]).toinclude(match"Enter a date within the 23/24 collection year, which is between 1st April 2023 and 31st March 2024")
expect(record.errors["startdate"]).toinclude(match"Enter a date within the 2023 to 2024 collection year, which is between 1st April 2023 and 31st March 2024")
end
end
it"cannot be after the second collection window end date"do
it"cannot be after the second collection window end date"do
expect(record.errors["startdate"]).toinclude(match"Enter a date within the 23/24 collection year, which is between 1st April 2023 and 31st March 2024")
expect(record.errors["startdate"]).toinclude(match"Enter a date within the 2023 to 2024 collection year, which is between 1st April 2023 and 31st March 2024")
end
end
end
end
@ -104,7 +104,7 @@ RSpec.describe Validations::SetupValidations do
expect(record.errors["startdate"]).toinclude(match"Enter a date within the 23/24 collection year, which is between 1st April 2023 and 31st March 2024")
expect(record.errors["startdate"]).toinclude(match"Enter a date within the 2023 to 2024 collection year, which is between 1st April 2023 and 31st March 2024")
end
end
xit"can edit already created logs for the previous collection year"do
xit"can edit already created logs for the previous collection year"do
@ -113,7 +113,7 @@ RSpec.describe Validations::SetupValidations do
expect(record.errors["startdate"]).not_toinclude(match"Enter a date within the 23/24 collection year, which is between 1st April 2023 and 31st March 2024")
expect(record.errors["startdate"]).not_toinclude(match"Enter a date within the 2023 to 2024 collection year, which is between 1st April 2023 and 31st March 2024")
end
end
end
end
@ -127,7 +127,7 @@ RSpec.describe Validations::SetupValidations do
expect(record.errors["startdate"]).toinclude(match"Enter a date within the 23/24 collection year, which is between 1st April 2023 and 31st March 2024")
expect(record.errors["startdate"]).toinclude(match"Enter a date within the 2023 to 2024 collection year, which is between 1st April 2023 and 31st March 2024")
end
end
it"cannot edit already created logs for the previous collection year"do
it"cannot edit already created logs for the previous collection year"do
@ -136,7 +136,7 @@ RSpec.describe Validations::SetupValidations do
expect(record.errors["startdate"]).toinclude(match"Enter a date within the 23/24 collection year, which is between 1st April 2023 and 31st March 2024")
expect(record.errors["startdate"]).toinclude(match"Enter a date within the 2023 to 2024 collection year, which is between 1st April 2023 and 31st March 2024")
end
end
end
end
end
end
@ -157,7 +157,7 @@ RSpec.describe Validations::SetupValidations do
record.startdate=Time.zone.local(2024,4,1)
record.startdate=Time.zone.local(2024,4,1)
setup_validator.validate_startdate_setup(record)
setup_validator.validate_startdate_setup(record)
expect(record.errors["startdate"].length).tobe>=2
expect(record.errors["startdate"].length).tobe>=2
expect(record.errors["startdate"][0]).toeq("Enter a date within the 23/24 collection year, which is between 1st April 2023 and 31st March 2024.")
expect(record.errors["startdate"][0]).toeq("Enter a date within the 2023 to 2024 collection year, which is between 1st April 2023 and 31st March 2024.")