Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert landlord-immigration-check to use ERB templates for questions #2136

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/smart_answer_flows/landlord-immigration-check.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ def define
status :published
satisfies_need "102373"

use_erb_templates_for_questions

postcode_question :property? do
permitted_next_nodes = [
:main_home?,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<% content_for :title do %>
Does the person have an application for a Registration Card issued by the Home Office showing that they can stay in the UK?
<% end %>

<% options(
"yes": "Yes",
"no": "No"
) %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<% content_for :title do %>
Does the person have a Certificate of Registration or Naturalisation as a British citizen?
<% end %>

<% options(
"yes": "Yes",
"no": "No"
) %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<% content_for :title do %>
Does the person have any of the following:
<% end %>

<% options(
"yes": "Yes",
"no": "No"
) %>

<% content_for :body do %>
- a Registration Certificate or Document Certifying Permanent Residence issued by the Home Office to a national of the EU, EEA or Switzerland
- a valid Biometric Residence Permit issued by the Home Office endorsed to show they’re allowed to stay indefinitely in the UK
- a Permanent Residence Card, indefinite leave to remain, indefinite leave to enter or no time limit card issued by the Home Office
- a valid passport showing that the person is exempt from immigration control, can stay indefinitely in the UK, has the right of abode in the UK or has no time limit on their stay in the UK
- a current Immigration Status Document showing that the person has indefinite leave to stay in the UK or has no time limit to their stay
- other documents exempting the person from immigration control (eg diplomatic passports, NATO ID card)
<% end %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<% content_for :title do %>
Does the person have 2 of the following:
<% end %>

<% options(
"yes": "Yes",
"no": "No"
) %>

<% content_for :body do %>
- a full birth or adoption certificate (that shows details of at least one of the birth
or adoptive parents) from the UK, the Channel Islands, the Isle of Man or Ireland
- an official letter or document (dated within the last 3 months) from a government agency or department (with their name and work address), an employer (with their name and company address) or UK passport holder (with their name, address and passport number) that confirms the person’s name and that they’re an employee
- a letter from a UK police force issued within the last 3 months confirming the person is a victim of crime and their documents have been stolen
- evidence that the person is currently serving in the UK armed forces or has previously served
- HM prison discharge papers or probation service letter (or the same from the Scottish or Northern Ireland Prison Service)
- a letter from a UK further or higher education institution confirming the person has been accepted for studies
- a current UK driving licence (either full or provisional)
- a current UK firearms or shot gun certificate
- a Disclosure or Barring Service certificate issued in the last 6 months
- benefits paperwork from HMRC, a local authority, the Department for Work and Pensions (DWP) or Jobcentre Plus within the last 12 months
<% end %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<% content_for :title do %>
Does the person have a current Residence Card that is issued by the Home Office to a non-EEA national who is the family member of an EU, EEA or Swiss national?
<% end %>

<% options(
"yes": "Yes",
"no": "No"
) %>

<% content_for :body do %>
This includes a current Accession Card or Derivative Card.
<% end %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<% content_for :title do %>
Does the person have a current or expired UK or Republic of Ireland passport or are they a named person in their parent’s UK or Republic of Ireland passport?
<% end %>

<% options(
"yes": "Yes",
"no": "No"
) %>

<% content_for :body do %>
A named person is someone who appears on someone else’s passport.
<% end %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<% content_for :title do %>
Does the person have an outstanding immigration application, immigration appeal or administrative review?
<% end %>

<% options(
"yes": "Yes",
"no": "No"
) %>

<% content_for :body do %>
They must also provide their Home Office reference number.
<% end %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<% content_for :title do %>
Is the person renting the property as their main and only home?
<% end %>

<% options(
"yes": "Yes",
"no": "No"
) %>

<% content_for :body do %>
This includes:

- tenancy agreement
- a lease
- a licence
- sub-lease or sub-tenancy
- lodgers
- paying house guests
- a family member living with the tenant as their main or only home
<% end %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<% content_for :title do %>
Enter the postcode of the property you want to let:
<% end %>

<% content_for :error_postcode_invalid do %>
Invalid postcode
<% end %>
<% content_for :error_postcode_incomplete do %>
Please enter a full postcode
<% end %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<% content_for :title do %>
What kind of property are you letting?
<% end %>

<% options(
"holiday_accommodation": "holiday accommodation",
"social_housing": "social housing",
"care_home": "a care home or hospice",
"hostel_or_refuge": "a hostel or refuge",
"mobile_home": "a mobile home",
"employee_accommodation": "accommodation to an employee or as part of training, eg tied accommodation",
"student_accommodation": "student accommodation",
"7_year_lease_property": "a residential property with a lease for 7 years or more"
) %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<% content_for :title do %>
Does the person have a certificate of right of abode in their passport?
<% end %>

<% options(
"yes": "Yes",
"no": "No"
) %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<% content_for :title do %>
Is the person:
<% end %>

<% options(
"eu_eea_switzerland": "from the EU, EEA or Switzerland",
"non_eea_but_with_eu_eea_switzerland_family_member": "a non-EEA family member of someone from the EU, EEA or Switzerland",
"somewhere_else": "from somewhere else"
) %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<% content_for :title do %>
Is the person at least 18 years of age?
<% end %>

<% options(
"yes": "Yes",
"no": "No"
) %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<% content_for :title do %>
Does the person have any of the following:
<% end %>

<% options(
"yes": "Yes",
"no": "No"
) %>

<% content_for :body do %>
- a current passport endorsed to show that the person can stay in the UK
- a current Biometric Residence Permit issued by the Home Office to the person showing that they can currently stay in the UK
- an Immigration Status Document issued by the Home Office with an endorsement showing the person can currently stay in the UK
<% end %>
126 changes: 0 additions & 126 deletions lib/smart_answer_flows/locales/en/landlord-immigration-check.yml

This file was deleted.

1 change: 1 addition & 0 deletions test/artefacts/landlord-immigration-check/B1 1PW.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ <h2>




</div>
</div>
</div>
Expand Down
2 changes: 2 additions & 0 deletions test/artefacts/landlord-immigration-check/B1 1PW/no.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ <h2>




<div class="">

<ul class="options">
Expand Down Expand Up @@ -93,6 +94,7 @@ <h2>




</div>
</div>
</div>
Expand Down
2 changes: 2 additions & 0 deletions test/artefacts/landlord-immigration-check/B1 1PW/yes.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ <h2>




<div class="">

<ul class="options inline">
Expand All @@ -57,6 +58,7 @@ <h2>




</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ <h2>




</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ <h2>




<div class="">

<ul class="options inline">
Expand All @@ -57,6 +58,7 @@ <h2>




</div>
</div>
</div>
Expand Down
Loading