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 benefits-cap-calculator to use ERB templates for questions #2113

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/benefit-cap-calculator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ def define
status :published
satisfies_need "100696"

use_erb_templates_for_questions

# Q1
multiple_choice :receive_housing_benefit? do
option :yes
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<% content_for :title do %>
How much do you or someone in your household get for Bereavement Allowance?
<% end %>

<% content_for :hint do %>
You need the whole amount before anything is taken off (eg utility bills or loan repayments) per week. You must enter the full amount you get for each benefit.
<% end %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<% content_for :title do %>
How much do you or someone in your household get for Carer's Allowance?
<% end %>

<% content_for :hint do %>
You need the whole amount before anything is taken off (eg utility bills or loan repayments) per week. You must enter the full amount you get for each benefit.
<% end %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<% content_for :title do %>
How much do you or someone in your household get for Child Benefits?
<% end %>

<% content_for :hint do %>
You need the whole amount before anything is taken off (eg utility bills or loan repayments) per week. You must enter the full amount you get for each benefit.
<% end %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<% content_for :title do %>
How much do you or someone in your household get for Child Tax Credits?
<% end %>

<% content_for :hint do %>
You need the whole amount before anything is taken off (eg utility bills or loan repayments) per week. You must enter the full amount you get for each benefit.
<% end %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<% content_for :title do %>
How much do you or someone in your household get for Employment and Support Allowance?
<% end %>

<% content_for :hint do %>
You need the whole amount before anything is taken off (eg utility bills or loan repayments) per week. You must enter the full amount you get for each benefit.
<% end %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<% content_for :title do %>
How much do you or someone in your household get for Guardian's Allowance?
<% end %>

<% content_for :hint do %>
You need the whole amount before anything is taken off (eg utility bills or loan repayments) per week. You must enter the full amount you get for each benefit.
<% end %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<% content_for :title do %>
How much do you or someone in your household get for Housing Benefit?
<% end %>

<% content_for :hint do %>
You need the whole amount before anything is taken off (eg utility bills or loan repayments) per week. You must enter the full amount you get for each benefit.
<% end %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<% content_for :title do %>
How much do you or someone in your household get for Incapacity Benefit?
<% end %>

<% content_for :hint do %>
You need the whole amount before anything is taken off (eg utility bills or loan repayments) per week. You must enter the full amount you get for each benefit.
<% end %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<% content_for :title do %>
How much do you or someone in your household get for Income Support?
<% end %>

<% content_for :hint do %>
You need the whole amount before anything is taken off (eg utility bills or loan repayments) per week. You must enter the full amount you get for each benefit.
<% end %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<% content_for :title do %>
How much do you or someone in your household get for Jobseeker’s Allowance?
<% end %>

<% content_for :hint do %>
You need the whole amount before anything is taken off (eg utility bills or loan repayments) per week. You must enter the full amount you get for each benefit.
<% end %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<% content_for :title do %>
How much do you or someone in your household get for Maternity Allowance?
<% end %>

<% content_for :hint do %>
You need the whole amount before anything is taken off (eg utility bills or loan repayments) per week. You must enter the full amount you get for each benefit.
<% end %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<% content_for :title do %>
Do you receive Housing Benefit?
<% end %>

<% options(
"yes": "Yes",
"no": "No"
) %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<% content_for :title do %>
Do you or someone in your household get any of the following benefits:
<% end %>

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

<% content_for :body do %>
- Attendance Allowance
- Disability Living Allowance
- Industrial Injuries Benefit
- Personal Independence Payment
- Employment and Support Allowance (support component)
- War Widow’s or War Widower’s Pension
- Armed Forces Compensation Scheme
- Armed Forces Independence Payment

<% end %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<% content_for :title do %>
Do you or someone in your household get any of the following benefits:
<% end %>

<% options(
"bereavement": "Bereavement Allowance",
"carers": "Carer's Allowance",
"child_benefit": "Child Benefit",
"child_tax": "Child Tax Credit",
"esa": "Employment and Support Allowance",
"guardian": "Guardian's Allowance",
"incapacity": "Incapacity Benefit",
"income_support": "Income Support",
"jsa": "Jobseeker’s Allowance",
"maternity": "Maternity Allowance",
"sda": "Severe Disablement Allowance",
"widowed_mother": "Widowed Mother's Allowance",
"widowed_parent": "Widowed Parent's Allowance",
"widow_pension": "Widow's Pension",
"widows_aged": "Widow's Pension (age related)",
"none_above": "None of the above"
) %>

<% content_for :hint do %>
If you do not receive any of these click Next step.
<% end %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<% content_for :title do %>
How much do you or someone in your household get for Severe Disability Allowance?
<% end %>

<% content_for :hint do %>
You need the whole amount before anything is taken off (eg utility bills or loan repayments) per week. You must enter the full amount you get for each benefit.
<% end %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<% content_for :title do %>
Are you:
<% end %>

<% options(
"single": "Single",
"couple": "Living as a couple (with or without children)",
"parent": "A lone parent with 1 or more dependent children"
) %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<% content_for :title do %>
How much do you or someone in your household get for Widow's Pension?
<% end %>

<% content_for :hint do %>
You need the whole amount before anything is taken off (eg utility bills or loan repayments) per week. You must enter the full amount you get for each benefit.
<% end %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<% content_for :title do %>
How much do you or someone in your household get for Widowed Mother's Allowance?
<% end %>

<% content_for :hint do %>
You need the whole amount before anything is taken off (eg utility bills or loan repayments) per week. You must enter the full amount you get for each benefit.
<% end %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<% content_for :title do %>
How much do you or someone in your household get for Widowed Parent's Allowance?
<% end %>

<% content_for :hint do %>
You need the whole amount before anything is taken off (eg utility bills or loan repayments) per week. You must enter the full amount you get for each benefit.
<% end %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<% content_for :title do %>
How much do you or someone in your household get for Widow's Pension (age related)?
<% end %>

<% content_for :hint do %>
You need the whole amount before anything is taken off (eg utility bills or loan repayments) per week. You must enter the full amount you get for each benefit.
<% end %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<% content_for :title do %>
Do you qualify for Working Tax Credit?
<% end %>

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

<% content_for :hint do %>
You don't need to be getting Working Tax Credit, only qualify for it.
<% end %>
144 changes: 0 additions & 144 deletions lib/smart_answer_flows/locales/en/benefit-cap-calculator.yml

This file was deleted.

2 changes: 2 additions & 0 deletions test/artefacts/benefit-cap-calculator/y.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
4 changes: 3 additions & 1 deletion test/artefacts/benefit-cap-calculator/yes.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ <h2>
<div class="question-body">


<p class="hint">You don&#39;t need to be getting Working Tax Credit, only qualify for it.</p>

<p class="hint">You don't need to be getting Working Tax Credit, only qualify for it.</p>

<div class="">

Expand All @@ -58,6 +59,7 @@ <h2>




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