Browse Source

CLDC-4154: Add a dropdown for needs type guidance

pull/3166/head
Samuel Young 1 week ago
parent
commit
5f31561430
  1. 3
      app/models/form/lettings/questions/needs_type.rb
  2. 5
      app/views/form/guidance/_needs_type.html.erb
  3. 4
      config/locales/forms/2026/lettings/guidance.en.yml
  4. 4
      config/locales/forms/2026/lettings/setup.en.yml

3
app/models/form/lettings/questions/needs_type.rb

@ -5,6 +5,9 @@ class Form::Lettings::Questions::NeedsType < ::Form::Question
@type = "radio" @type = "radio"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] if form.start_date.present? @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] if form.start_date.present?
@top_guidance_partial = if form.start_year_2026_or_later?
"needs_type"
end
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

5
app/views/form/guidance/_needs_type.html.erb

@ -0,0 +1,5 @@
<div class="govuk-body">
<%= govuk_details(summary_text: I18n.t("forms.#{@log.form.start_date.year}.lettings.guidance.needs_type.title")) do %>
<%= I18n.t("forms.#{@log.form.start_date.year}.lettings.guidance.needs_type.content").html_safe %>
<% end %>
</div>

4
config/locales/forms/2026/lettings/guidance.en.yml

@ -67,3 +67,7 @@ en:
<li>Some properties may not be available yet e.g. new builds; you might need to enter them manually instead</li> <li>Some properties may not be available yet e.g. new builds; you might need to enter them manually instead</li>
<li>For UPRN (Unique Property Reference Number), please enter the full value exactly</li> <li>For UPRN (Unique Property Reference Number), please enter the full value exactly</li>
</ul>" </ul>"
needs_type:
title: "What are the need types?"
content: "General needs housing includes both self-contained and shared housing without support or specific adaptations.<br><br>Supported housing is housing with special design facilities or features targeted at a specific client group requiring support, for example housing designed for older people, sheltered accommodation, extra care housing. It can include direct access hostels, group homes, and purpose-built self-contained housing. We do not require CORE logs for residential care or nursing homes."

4
config/locales/forms/2026/lettings/setup.en.yml

@ -25,10 +25,10 @@ en:
question_text: "Which user are you creating this log for?" question_text: "Which user are you creating this log for?"
needstype: needstype:
page_header: "" page_header: "Needs type"
check_answer_label: "Needs type" check_answer_label: "Needs type"
check_answer_prompt: "" check_answer_prompt: ""
hint_text: "General needs housing includes both self-contained and shared housing without support or specific adaptations. Supported housing can include direct access hostels, group homes, residential care and nursing homes." hint_text: ""
question_text: "What is the needs type?" question_text: "What is the needs type?"
scheme_id: scheme_id:

Loading…
Cancel
Save