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 plan-adoption-leave to use ERB templates for questions #2145

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
16 changes: 0 additions & 16 deletions lib/smart_answer_flows/locales/en/plan-adoption-leave.yml

This file was deleted.

2 changes: 2 additions & 0 deletions lib/smart_answer_flows/plan-adoption-leave.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ def define
status :published
satisfies_need "101018"

use_erb_templates_for_questions

date_question :child_match_date? do
save_input_as :match_date

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<% content_for :title do %>
When will the child start to live with you?
<% end %>

<% content_for :hint do %>
This is sometimes known as the 'date of placement'.
<% end %>

<% content_for :error_message do %>
Please enter a date after the match date.
<% end %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<% content_for :title do %>
When were you matched with the child?
<% end %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<% content_for :title do %>
When do you want to start your adoption leave?
<% end %>

<% content_for :hint do %>
Leave can start up to 14 days before the child comes to live with you.
<% end %>

<% content_for :error_message do %>
Enter a date up to 14 days before the child comes to live with you.
<% end %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<% content_for :title do %>
Plan your adoption leave
<% end %>
4 changes: 3 additions & 1 deletion test/artefacts/plan-adoption-leave/2015-01-01.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">This is sometimes known as the &#39;date of placement&#39;.</p>

<p class="hint">This is sometimes known as the 'date of placement'.</p>

<div class="">

Expand Down Expand Up @@ -112,6 +113,7 @@ <h2>




</div>
</div>
</div>
Expand Down
2 changes: 2 additions & 0 deletions test/artefacts/plan-adoption-leave/2015-01-01/2015-02-08.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ <h2>
<div class="question-body">



<p class="hint">Leave can start up to 14 days before the child comes to live with you.</p>

<div class="">
Expand Down Expand Up @@ -112,6 +113,7 @@ <h2>




</div>
</div>
</div>
Expand Down
2 changes: 2 additions & 0 deletions test/artefacts/plan-adoption-leave/y.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ <h2>




<div class="">

<fieldset>
Expand Down Expand Up @@ -111,6 +112,7 @@ <h2>




</div>
</div>
</div>
Expand Down
7 changes: 5 additions & 2 deletions test/data/plan-adoption-leave-files.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
---
lib/smart_answer_flows/plan-adoption-leave.rb: 8d7b2c69fdebf33ef1dab56b08293900
lib/smart_answer_flows/locales/en/plan-adoption-leave.yml: 857c472839ae8a5075d18e12f4ce3a10
lib/smart_answer_flows/plan-adoption-leave.rb: fa5c5796c06fc96be131475c6fc8a6fb
test/data/plan-adoption-leave-questions-and-responses.yml: 7f0c938658602739b7c7451f60255ac4
test/data/plan-adoption-leave-responses-and-expected-results.yml: 51c73fbdb544c4b15e8562e614946c42
lib/smart_answer_flows/plan-adoption-leave/outcomes/adoption_leave_details.govspeak.erb: 983d9818c81838dcf8c893007102e8f1
lib/smart_answer_flows/plan-adoption-leave/plan_adoption_leave.govspeak.erb: e51ba0db1bd0742b80b26454f9750908
lib/smart_answer_flows/plan-adoption-leave/questions/child_arrival_date.govspeak.erb: ee0f787a09e90931e104a0e07e3b1113
lib/smart_answer_flows/plan-adoption-leave/questions/child_match_date.govspeak.erb: 8d6b8f807bd5ab925cb62b26967960da
lib/smart_answer_flows/plan-adoption-leave/questions/leave_start.govspeak.erb: 09b93227b795d55d9106851116460f2c
lib/smart_answer_flows/plan-adoption-leave/questions/meta.govspeak.erb: 695d31e59d3b964c430b8c7ccfe3928b
lib/smart_answer/calculators/plan_adoption_leave.rb: 80b6eb2de784f121761a36e60ce16a57