113 changed files with 1740 additions and 384 deletions
@ -1,9 +1,45 @@
|
||||
class CollectionResource < ApplicationRecord |
||||
include Rails.application.routes.url_helpers |
||||
has_paper_trail |
||||
|
||||
attr_accessor :file |
||||
|
||||
scope :visible, -> { where(discarded_at: nil) } |
||||
validates :short_display_name, presence: true |
||||
|
||||
def download_path |
||||
download_mandatory_collection_resource_path(log_type:, year:, resource_type:) |
||||
if mandatory |
||||
download_mandatory_collection_resource_path(log_type:, year:, resource_type:) |
||||
else |
||||
collection_resource_download_path(self) |
||||
end |
||||
end |
||||
|
||||
def validate_attached_file |
||||
return errors.add(:file, :blank) unless file |
||||
return errors.add(:file, :above_100_mb) if file.size > 100.megabytes |
||||
|
||||
argv = %W[file --brief --mime-type -- #{file.path}] |
||||
output = `#{argv.shelljoin}` |
||||
|
||||
case resource_type |
||||
when "paper_form" |
||||
unless output.match?(/application\/pdf/) |
||||
errors.add(:file, :must_be_pdf) |
||||
end |
||||
when "bulk_upload_template", "bulk_upload_specification" |
||||
unless output.match?(/application\/vnd\.ms-excel|application\/vnd\.openxmlformats-officedocument\.spreadsheetml\.sheet/) |
||||
errors.add(:file, :must_be_xlsx, resource: short_display_name.downcase) |
||||
end |
||||
end |
||||
end |
||||
|
||||
def validate_short_display_name |
||||
errors.add(:short_display_name, :blank) if short_display_name.blank? |
||||
end |
||||
|
||||
def discard! |
||||
CollectionResourcesService.new.delete_collection_resource(download_filename) |
||||
update!(discarded_at: Time.zone.now) |
||||
end |
||||
end |
||||
|
||||
@ -0,0 +1,31 @@
|
||||
<% content_for :before_content do %> |
||||
<% content_for :title, "Are you sure you want to delete the #{@collection_resource.short_display_name.downcase}?" %> |
||||
<%= govuk_back_link href: collection_resources_path %> |
||||
<% end %> |
||||
|
||||
<div class="govuk-grid-row"> |
||||
<div class="govuk-grid-column-two-thirds-from-desktop"> |
||||
<span class="govuk-caption-l"><%= "#{@collection_resource.log_type.humanize} #{text_year_range_format(@collection_resource.year)}" %></span> |
||||
<h1 class="govuk-heading-xl"> |
||||
<%= content_for(:title) %> |
||||
</h1> |
||||
<p class="govuk-body app-!-colour-muted"> |
||||
This file will no longer be available for users to download. |
||||
</p> |
||||
|
||||
<%= govuk_warning_text(text: "You will not be able to undo this action.") %> |
||||
|
||||
<div class="govuk-button-group"> |
||||
<%= govuk_button_to( |
||||
"Delete resource", |
||||
collection_resource_delete_path(@collection_resource), |
||||
method: :delete, |
||||
) %> |
||||
<%= govuk_button_link_to( |
||||
"Cancel", |
||||
collection_resources_path, |
||||
secondary: true, |
||||
) %> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
@ -0,0 +1,36 @@
|
||||
<% content_for :before_content do %> |
||||
<%= govuk_back_link href: collection_resources_path %> |
||||
<% end %> |
||||
|
||||
<div class="govuk-grid-row"> |
||||
<div class="govuk-grid-column-two-thirds"> |
||||
<%= form_with model: @collection_resource, url: collection_resources_path, method: :post do |f| %> |
||||
<%= f.hidden_field :year %> |
||||
<%= f.hidden_field :log_type %> |
||||
<%= f.hidden_field :mandatory, value: false %> |
||||
|
||||
<%= f.govuk_error_summary %> |
||||
|
||||
<span class="govuk-caption-l"><%= "#{@collection_resource.log_type.humanize} #{text_year_range_format(@collection_resource.year)}" %></span> |
||||
<h1 class="govuk-heading-l">Add a new collection resource</h1> |
||||
|
||||
<p class="govuk-body"> |
||||
This file will be available for all users to download. |
||||
</p> |
||||
|
||||
<%= f.govuk_file_field :file, |
||||
label: { text: "Upload file", size: "m" } %> |
||||
|
||||
<%= f.govuk_text_field :short_display_name, |
||||
label: { text: "Resource type", size: "m" }, |
||||
hint: { text: safe_join(["This will be used in the download link on the homepage. Do not include the log type or collection year.", |
||||
content_tag(:br), |
||||
"For example, if you enter “bulk upload change log”, the download link will say “Download the #{@collection_resource.log_type} bulk upload change log (#{text_year_range_format(@collection_resource.year)})”."]) } %> |
||||
|
||||
<div class="govuk-button-group"> |
||||
<%= f.govuk_submit "Add resource" %> |
||||
<%= govuk_button_link_to "Cancel", collection_resources_path, secondary: true %> |
||||
</div> |
||||
<% end %> |
||||
</div> |
||||
</div> |
||||
@ -0,0 +1,34 @@
|
||||
en: |
||||
forms: |
||||
2023: |
||||
sales: |
||||
household_needs: |
||||
hhregres: |
||||
page_header: "" |
||||
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?" |
||||
@ -0,0 +1,90 @@
|
||||
en: |
||||
forms: |
||||
2023: |
||||
sales: |
||||
income_benefits_and_savings: |
||||
buyer_1_income: |
||||
page_header: "" |
||||
income1nk: |
||||
check_answer_label: "Buyer 1’s gross annual income known?" |
||||
hint_text: "" |
||||
question_text: "Do you know buyer 1’s annual income?" |
||||
income1: |
||||
check_answer_label: "Buyer 1’s gross annual income" |
||||
hint_text: "Provide the gross annual income (i.e. salary before tax) plus the annual amount of benefits, Universal Credit or pensions, and income from investments." |
||||
question_text: "Buyer 1’s gross annual income" |
||||
|
||||
inc1mort: |
||||
page_header: "" |
||||
check_answer_label: "Buyer 1’s income used for mortgage application" |
||||
hint_text: "" |
||||
question_text: "Was buyer 1’s income used for a mortgage application?" |
||||
|
||||
buyer_2_income: |
||||
page_header: "" |
||||
income2nk: |
||||
check_answer_label: "Buyer 2’s gross annual income known?" |
||||
hint_text: "" |
||||
question_text: "Do you know buyer 2’s annual income?" |
||||
income2: |
||||
check_answer_label: "Buyer 2’s gross annual income" |
||||
hint_text: "Provide the gross annual income (i.e. salary before tax) plus the annual amount of benefits, Universal Credit or pensions, and income from investments." |
||||
question_text: "Buyer 2’s gross annual income" |
||||
|
||||
inc2mort: |
||||
page_header: "" |
||||
check_answer_label: "Buyer 2’s income used for mortgage application" |
||||
hint_text: "" |
||||
question_text: "Was buyer 2’s income used for a mortgage application?" |
||||
|
||||
housing_benefits: |
||||
joint_purchase: |
||||
page_header: "" |
||||
check_answer_label: "Housing-related benefits buyers received before buying this property" |
||||
hint_text: "" |
||||
question_text: "Were the buyers receiving any of these housing-related benefits immediately before buying this property?" |
||||
not_joint_purchase: |
||||
page_header: "" |
||||
check_answer_label: "Housing-related benefits buyer received before buying this property" |
||||
hint_text: "" |
||||
question_text: "Was the buyer receiving any of these housing-related benefits immediately before buying this property?" |
||||
|
||||
savings: |
||||
joint_purchase: |
||||
page_header: "" |
||||
savingsnk: |
||||
check_answer_label: "Buyers’ total savings known?" |
||||
hint_text: "" |
||||
question_text: "Do you know how much the 'buyers' had in savings before they paid any deposit for the property?" |
||||
savings: |
||||
check_answer_label: "Buyers’ total savings before any deposit paid" |
||||
hint_text: "Include any savings, investments, ISAs, premium bonds, shares, or money held in a bank or building society account." |
||||
question_text: "Enter their total savings to the nearest £10" |
||||
not_joint_purchase: |
||||
page_header: "" |
||||
savingsnk: |
||||
check_answer_label: "Buyer’s total savings known?" |
||||
hint_text: "" |
||||
question_text: "Do you know how much the buyer had in savings before they paid any deposit for the property?" |
||||
savings: |
||||
check_answer_label: "Buyer’s total savings before any deposit paid" |
||||
hint_text: "Include any savings, investments, ISAs, premium bonds, shares, or money held in a bank or building society account." |
||||
question_text: "Enter their total savings to the nearest £10" |
||||
|
||||
prevown: |
||||
joint_purchase: |
||||
page_header: "" |
||||
check_answer_label: "Buyers previously owned a property." |
||||
hint_text: "" |
||||
question_text: "Have any of the buyers previously owned a property?" |
||||
not_joint_purchase: |
||||
page_header: "" |
||||
check_answer_label: "Buyer previously owned a property." |
||||
hint_text: "" |
||||
question_text: "Has the buyer previously owned a property?" |
||||
|
||||
prevshared: |
||||
page_header: "" |
||||
check_answer_label: "Previous property shared ownership?" |
||||
hint_text: "For any buyer" |
||||
question_text: "Was the previous property under shared ownership?" |
||||
@ -0,0 +1,66 @@
|
||||
en: |
||||
forms: |
||||
2023: |
||||
sales: |
||||
soft_validations: |
||||
income1_value_check: |
||||
page_header: "" |
||||
check_answer_label: "Buyer 1 income confirmation" |
||||
hint_text: "" |
||||
question_text: "Are you sure this is correct?" |
||||
min: |
||||
title_text: "You told us income was %{income}." |
||||
informative_text: "This is less than we would expect for someone in this working situation." |
||||
max: |
||||
title_text: "You told us the income of buyer 1 is %{income}. This seems high. Are you sure this is correct?" |
||||
income2_value_check: |
||||
page_header: "" |
||||
check_answer_label: "Buyer 2 income confirmation" |
||||
hint_text: "" |
||||
question_text: "Are you sure this is correct?" |
||||
min: |
||||
title_text: "You told us income was %{income}." |
||||
informative_text: "This is less than we would expect for someone in this working situation." |
||||
max: |
||||
title_text: "You told us the income of buyer 2 is %{income}. This seems high. Are you sure this is correct?" |
||||
combined_income_value_check: |
||||
page_header: "" |
||||
check_answer_label: "Combined income confirmation" |
||||
hint_text: "" |
||||
question_text: "Are you sure this is correct?" |
||||
title_text: "You told us the combined income of this household is %{combined_income}. This seems high. Are you sure this is correct?" |
||||
mortgage_value_check: |
||||
page_header: "" |
||||
check_answer_label: "Mortgage confirmation" |
||||
hint_text: "" |
||||
question_text: "Are you sure that the mortgage is more than 5 times the income used for the mortgage application?" |
||||
title_text: "You told us that the mortgage amount is %{mortgage}." |
||||
informative_text: "This is more than 5 times the income, which is higher than we would expect." |
||||
savings_value_check: |
||||
page_header: "" |
||||
check_answer_label: "Savings confirmation" |
||||
hint_text: "" |
||||
question_text: "Are you sure the savings are higher than £100,000?" |
||||
joint_purchase: |
||||
title_text: You told us the buyers’ savings were %{savings}." |
||||
informative_text: "This is higher than we would expect." |
||||
not_joint_purchase: |
||||
title_text: "You told us the buyer’s savings were %{savings}." |
||||
informative_text: "This is higher than we would expect." |
||||
deposit_value_check:: |
||||
page_header: "" |
||||
check_answer_label: "Deposit confirmation" |
||||
hint_text: "" |
||||
question_text: "Are you sure that the deposit is this much higher than the buyer's savings?" |
||||
joint_purchase: |
||||
title_text: "You told us the buyers’ deposit was %{deposit} and their savings were %{savings}." |
||||
informative_text: "The deposit amount is higher than we would expect for the amount of savings they have." |
||||
not_joint_purchase: |
||||
title_text: "You told us the buyer’s deposit was %{deposit} and their savings were %{savings}." |
||||
informative_text: "The deposit amount is higher than we would expect for the amount of savings they have." |
||||
wheel_value_check: |
||||
page_header: "" |
||||
check_answer_label: "Does anyone in the household use a wheelchair?" |
||||
hint_text: "" |
||||
question_text: "You told us that someone in the household uses a wheelchair." |
||||
title_text: "You told us that someone in the household uses a wheelchair." |
||||
@ -0,0 +1,34 @@
|
||||
en: |
||||
forms: |
||||
2024: |
||||
sales: |
||||
household_needs: |
||||
hhregres: |
||||
page_header: "" |
||||
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?" |
||||
@ -0,0 +1,90 @@
|
||||
en: |
||||
forms: |
||||
2024: |
||||
sales: |
||||
income_benefits_and_savings: |
||||
buyer_1_income: |
||||
page_header: "" |
||||
income1nk: |
||||
check_answer_label: "Buyer 1’s gross annual income known?" |
||||
hint_text: "" |
||||
question_text: "Do you know buyer 1’s annual income?" |
||||
income1: |
||||
check_answer_label: "Buyer 1’s gross annual income" |
||||
hint_text: "Provide the gross annual income (i.e. salary before tax) plus the annual amount of benefits, Universal Credit or pensions, and income from investments." |
||||
question_text: "Buyer 1’s gross annual income" |
||||
|
||||
inc1mort: |
||||
page_header: "" |
||||
check_answer_label: "Buyer 1’s income used for mortgage application" |
||||
hint_text: "" |
||||
question_text: "Was buyer 1’s income used for a mortgage application?" |
||||
|
||||
buyer_2_income: |
||||
page_header: "" |
||||
income2nk: |
||||
check_answer_label: "Buyer 2’s gross annual income known?" |
||||
hint_text: "" |
||||
question_text: "Do you know buyer 2’s annual income?" |
||||
income2: |
||||
check_answer_label: "Buyer 2’s gross annual income" |
||||
hint_text: "Provide the gross annual income (i.e. salary before tax) plus the annual amount of benefits, Universal Credit or pensions, and income from investments." |
||||
question_text: "Buyer 2’s gross annual income" |
||||
|
||||
inc2mort: |
||||
page_header: "" |
||||
check_answer_label: "Buyer 2’s income used for mortgage application" |
||||
hint_text: "" |
||||
question_text: "Was buyer 2’s income used for a mortgage application?" |
||||
|
||||
housing_benefits: |
||||
joint_purchase: |
||||
page_header: "" |
||||
check_answer_label: "Housing-related benefits buyers received before buying this property" |
||||
hint_text: "" |
||||
question_text: "Were the buyers receiving any of these housing-related benefits immediately before buying this property?" |
||||
not_joint_purchase: |
||||
page_header: "" |
||||
check_answer_label: "Housing-related benefits buyer received before buying this property" |
||||
hint_text: "" |
||||
question_text: "Was the buyer receiving any of these housing-related benefits immediately before buying this property?" |
||||
|
||||
savings: |
||||
joint_purchase: |
||||
page_header: "" |
||||
savingsnk: |
||||
check_answer_label: "Buyers’ total savings known?" |
||||
hint_text: "" |
||||
question_text: "Do you know how much the 'buyers' had in savings before they paid any deposit for the property?" |
||||
savings: |
||||
check_answer_label: "Buyers’ total savings before any deposit paid" |
||||
hint_text: "Include any savings, investments, ISAs, premium bonds, shares, or money held in a bank or building society account." |
||||
question_text: "Enter their total savings to the nearest £10" |
||||
not_joint_purchase: |
||||
page_header: "" |
||||
savingsnk: |
||||
check_answer_label: "Buyer’s total savings known?" |
||||
hint_text: "" |
||||
question_text: "Do you know how much the buyer had in savings before they paid any deposit for the property?" |
||||
savings: |
||||
check_answer_label: "Buyer’s total savings before any deposit paid" |
||||
hint_text: "Include any savings, investments, ISAs, premium bonds, shares, or money held in a bank or building society account." |
||||
question_text: "Enter their total savings to the nearest £10" |
||||
|
||||
prevown: |
||||
joint_purchase: |
||||
page_header: "" |
||||
check_answer_label: "Buyers previously owned a property." |
||||
hint_text: "" |
||||
question_text: "Have any of the buyers previously owned a property?" |
||||
not_joint_purchase: |
||||
page_header: "" |
||||
check_answer_label: "Buyer previously owned a property." |
||||
hint_text: "" |
||||
question_text: "Has the buyer previously owned a property?" |
||||
|
||||
prevshared: |
||||
page_header: "" |
||||
check_answer_label: "Previous property shared ownership?" |
||||
hint_text: "For any buyer" |
||||
question_text: "Was the previous property under shared ownership?" |
||||
@ -0,0 +1,66 @@
|
||||
en: |
||||
forms: |
||||
2024: |
||||
sales: |
||||
soft_validations: |
||||
income1_value_check: |
||||
page_header: "" |
||||
check_answer_label: "Buyer 1 income confirmation" |
||||
hint_text: "" |
||||
question_text: "Are you sure this is correct?" |
||||
min: |
||||
title_text: "You told us income was %{income}." |
||||
informative_text: "This is less than we would expect for someone in this working situation." |
||||
max: |
||||
title_text: "You told us the income of buyer 1 is %{income}. This seems high. Are you sure this is correct?" |
||||
income2_value_check: |
||||
page_header: "" |
||||
check_answer_label: "Buyer 2 income confirmation" |
||||
hint_text: "" |
||||
question_text: "Are you sure this is correct?" |
||||
min: |
||||
title_text: "You told us income was %{income}." |
||||
informative_text: "This is less than we would expect for someone in this working situation." |
||||
max: |
||||
title_text: "You told us the income of buyer 2 is %{income}. This seems high. Are you sure this is correct?" |
||||
combined_income_value_check: |
||||
page_header: "" |
||||
check_answer_label: "Combined income confirmation" |
||||
hint_text: "" |
||||
question_text: "Are you sure this is correct?" |
||||
title_text: "You told us the combined income of this household is %{combined_income}. This seems high. Are you sure this is correct?" |
||||
mortgage_value_check: |
||||
page_header: "" |
||||
check_answer_label: "Mortgage confirmation" |
||||
hint_text: "" |
||||
question_text: "Are you sure that the mortgage is more than 5 times the income used for the mortgage application?" |
||||
title_text: "You told us that the mortgage amount is %{mortgage}." |
||||
informative_text: "This is more than 5 times the income, which is higher than we would expect." |
||||
savings_value_check: |
||||
page_header: "" |
||||
check_answer_label: "Savings confirmation" |
||||
hint_text: "" |
||||
question_text: "Are you sure the savings are higher than £100,000?" |
||||
joint_purchase: |
||||
title_text: You told us the buyers’ savings were %{savings}." |
||||
informative_text: "This is higher than we would expect." |
||||
not_joint_purchase: |
||||
title_text: "You told us the buyer’s savings were %{savings}." |
||||
informative_text: "This is higher than we would expect." |
||||
deposit_value_check: |
||||
page_header: "" |
||||
check_answer_label: "Deposit confirmation" |
||||
hint_text: "" |
||||
question_text: "Are you sure that the deposit is this much higher than the buyer's savings?" |
||||
joint_purchase: |
||||
title_text: "You told us the buyers’ deposit was %{deposit} and their savings were %{savings}." |
||||
informative_text: "The deposit amount is higher than we would expect for the amount of savings they have." |
||||
not_joint_purchase: |
||||
title_text: "You told us the buyer’s deposit was %{deposit} and their savings were %{savings}." |
||||
informative_text: "The deposit amount is higher than we would expect for the amount of savings they have." |
||||
wheel_value_check: |
||||
page_header: "" |
||||
check_answer_label: "Does anyone in the household use a wheelchair?" |
||||
hint_text: "" |
||||
question_text: "You told us that someone in the household uses a wheelchair." |
||||
title_text: "You told us that someone in the household uses a wheelchair." |
||||
@ -0,0 +1,47 @@
|
||||
en: |
||||
validations: |
||||
sales: |
||||
household: |
||||
buylivein: |
||||
buyers_will_live_in_property_values_inconsistent: "You have already told us that both buyer 1 and buyer 2 will not live in the property." |
||||
buy1livein: |
||||
buyers_will_live_in_property_values_inconsistent: "You have already told us that the buyers will live in the property. Either buyer 1 or buyer 2 must live in the property." |
||||
buy2livein: |
||||
buyers_will_live_in_property_values_inconsistent: "You have already told us that the buyers will live in the property. Either buyer 1 or buyer 2 must live in the property." |
||||
ownershipsch: |
||||
prevten_invalid_for_discounted_sale: "Buyer 1’s previous tenure should be “local authority tenant” or “private registered provider or housing association tenant” for discounted sales." |
||||
prevten: |
||||
prevten_invalid_for_discounted_sale: "Buyer 1’s previous tenure should be “local authority tenant” or “private registered provider or housing association tenant” for discounted sales." |
||||
age1: |
||||
child_12_years_younger: "A child must be at least 12 years younger than their parent." |
||||
ecstat1: |
||||
buyer_cannot_be_child: "Buyer 1 cannot have a working situation of child under 16." |
||||
ecstat2: |
||||
buyer_cannot_be_child: "Buyer 2 cannot have a working situation of child under 16." |
||||
age: |
||||
child_12_years_younger: "A child must be at least 12 years younger than their parent." |
||||
child_under_16: "Answer cannot be under 16 as person %{person_num}'s relationship to buyer 1 is ‘partner’." |
||||
child_under_16_ecstat: "Answer cannot be under 16 as person %{person_num}’s working situation is not ‘child under 16’, ‘other’ or ‘prefers not to say’." |
||||
child_over_16: "Answer cannot be over 16 as person’s %{person_num} working situation is ‘child under 16‘." |
||||
child_over_20: "Answer cannot be 20 or over as the relationship is ‘child’." |
||||
student_16_19: |
||||
cannot_be_16_19: |
||||
child_not_student: "Person cannot be aged 16-19 if they have relationship ‘child’ but are not a student." |
||||
must_be_16_19: "Person must be aged 16-19 if they are a student and have relationship ‘child’." |
||||
relat: |
||||
one_partner: "Number of partners cannot be greater than 1." |
||||
child_12_years_younger: "A child must be at least 12 years younger than their parent." |
||||
child_under_16: "Answer cannot be ‘partner’ as you told us person %{person_num}'s age is under 16." |
||||
child_over_20: "Answer cannot be ‘child’ if the person's age is 20 or over." |
||||
student_16_19: |
||||
cannot_be_child: |
||||
student_not_16_19: "Answer cannot be ‘child’ if the person is a student but not aged 16-19." |
||||
16_19_not_student: "Answer cannot be ‘child’ if the person is aged 16-19 but not a student." |
||||
ecstat: |
||||
child_under_16: "Person %{person_num}’s working situation must be ‘child under 16’, ‘other’ or ‘prefers not to say’ as you told us they’re under 16." |
||||
child_over_16: "Answer cannot be ‘child under 16’ as you told us the person %{person_num} is older than 16." |
||||
student_16_19: |
||||
must_be_student: "Person must be a student if they are aged 16-19 and have relationship ‘child’." |
||||
cannot_be_student: |
||||
child_not_16_19: "Person cannot be a student if they are not aged 16-19 but have relationship ‘child’." |
||||
buyer_cannot_be_over_16_and_child: "Buyer %{buyer_index}'s age cannot be 16 or over if their working situation is child under 16." |
||||
@ -0,0 +1,27 @@
|
||||
en: |
||||
validations: |
||||
sales: |
||||
property_information: |
||||
postcode_full: |
||||
postcode_must_match_previous: |
||||
joint_purchase: "Buyers’ last accommodation and discounted ownership postcodes must match." |
||||
not_joint_purchase: "Buyer’s last accommodation and discounted ownership postcodes must match." |
||||
ppostcode_full: |
||||
postcode_must_match_previous: |
||||
joint_purchase: "Buyers’ last accommodation and discounted ownership postcodes must match." |
||||
not_joint_purchase: "Buyer’s last accommodation and discounted ownership postcodes must match." |
||||
ownershipsch: |
||||
postcode_must_match_previous: |
||||
joint_purchase: "Buyers’ last accommodation and discounted ownership postcodes must match." |
||||
not_joint_purchase: "Buyer’s last accommodation and discounted ownership postcodes must match." |
||||
uprn: |
||||
postcode_must_match_previous: |
||||
joint_purchase: "Buyers’ last accommodation and discounted ownership postcodes must match." |
||||
not_joint_purchase: "Buyer’s last accommodation and discounted ownership postcodes must match." |
||||
invalid: "UPRN must be 12 digits or less." |
||||
beds: |
||||
bedsits_have_max_one_bedroom: "Number of bedrooms must be 1 if the property is a bedsit." |
||||
proptype: |
||||
bedsits_have_max_one_bedroom: "Answer cannot be 'Bedsit' if the property has 2 or more bedrooms." |
||||
uprn_known: |
||||
invalid: "You must answer UPRN known?" |
||||
@ -0,0 +1,5 @@
|
||||
class AddDiscardedAt < ActiveRecord::Migration[7.0] |
||||
def change |
||||
add_column :collection_resources, :discarded_at, :datetime |
||||
end |
||||
end |
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue