Skip to content

Commit

Permalink
Crimapp 1504 depenants question (#1282)
Browse files Browse the repository at this point in the history
CRIMAPP-1504 update dependants content
  • Loading branch information
timpeat authored Nov 29, 2024
1 parent 0a4ffe8 commit bed4308
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 16 deletions.
8 changes: 4 additions & 4 deletions app/views/steps/income/client_has_dependants/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
<%= f.govuk_collection_radio_buttons :client_has_dependants, @form_object.choices,
:value, inline: false,
legend: { text: t('.client_has_dependants'), tag: 'h1', size: 'xl' } do %>
<p><%= t('.dependant_definitions.intro') %></p>
<p class="govuk-body"><%= t('.dependants_definition.intro') %></p>
<ul class="govuk-list govuk-list--bullet">
<li><%= t('.dependant_definitions.definition_1') %></li>
<li><%= t('.dependant_definitions.definition_2') %></li>
<li><%= t('.dependant_definitions.definition_3') %></li>
<% t('.dependants_definition.definitions').each do |definition| %>
<li><%= definition %></li>
<% end %>
</ul>
<% end %>

Expand Down
11 changes: 8 additions & 3 deletions app/views/steps/income/dependants/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,14 @@
<%= render partial: 'shared/flash_banner' %>
<%= govuk_error_summary(@form_object) %>

<div class="govuk-inset-text">
Enter ‘0’ if a dependant is currently under 1 year old.
</div>
<p class="govuk-body"><%= t('.dependants_definition.intro') %></p>
<ul class="govuk-list govuk-list--bullet">
<% t('.dependants_definition.definitions').each do |definition| %>
<li><%= definition %></li>
<% end %>
</ul>

<div class="govuk-inset-text"><%= t('.under_one_instruction') %></div>

<%= step_form @form_object, data: { module: 'multi-action-form' } do |f| %>
<%= f.fields_for :dependants do |c| %>
Expand Down
15 changes: 11 additions & 4 deletions config/locales/en/errors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -609,10 +609,17 @@ en:
steps/income/dependant_fieldset_form:
summary:
age:
not_a_number: "The %{ordinal} dependant's age must be a number"
blank: "Enter %{ordinal} dependant's age"
less_than: "The %{ordinal} dependant must be under 18 years old"
greater_than_or_equal_to: "The %{ordinal} dependant must be at least 0 years old"
not_a_number: The %{ordinal} dependant's age must be a number
blank: Enter %{ordinal} dependant's age
less_than: The %{ordinal} dependant's age must be under 18
greater_than_or_equal_to: The %{ordinal} dependant must be at least 0
attributes:
age:
not_a_number: Dependant's age must be a number
blank: Enter dependant's age
less_than: Dependant's age must be under 18
greater_than_or_equal_to: Dependant's age must be at least 0

steps/income/income_payments_form:
attributes:
base:
Expand Down
13 changes: 8 additions & 5 deletions config/locales/en/steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -325,11 +325,12 @@ en:
edit:
page_title: 'Does your client have any dependants?'
client_has_dependants: 'Does your client have any dependants?'
dependant_definitions:
intro: 'Include anyone who is all of these:'
definition_1: 'under 18 years old'
definition_2: 'lives with your client'
definition_3: 'depends on your client for financial support'
dependants_definition: &dependants_definition
intro: 'Only include dependants if all of the following apply - if they:'
definitions:
- 'are under 18 years old'
- 'live with your client'
- 'depend on your client financially'
dependants:
edit:
page_title: Dependants’ ages
Expand All @@ -339,6 +340,8 @@ en:
remove_button: Remove %{ordinal} dependant
add_button: Add another dependant
deleted_flash: The dependant has been deleted
dependants_definition: *dependants_definition
under_one_instruction: Enter ‘0’ if a dependant is currently under 1 year old.
answers:
edit:
page_title: Check your answers - Your client's income
Expand Down

0 comments on commit bed4308

Please sign in to comment.