From abf9ef76bbacd7f7cecafad99ea639d5cf675ec2 Mon Sep 17 00:00:00 2001 From: Arthur Campbell Date: Wed, 8 Mar 2023 13:23:38 +0000 Subject: [PATCH] update copy, use method for testing whether we are in the crossover period, remove focus from test file --- app/views/schemes/toggle_active.html.erb | 4 ++-- config/locales/en.yml | 4 ++-- spec/helpers/collection_time_helper_spec.rb | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/views/schemes/toggle_active.html.erb b/app/views/schemes/toggle_active.html.erb index 1b7507375..2fae18368 100644 --- a/app/views/schemes/toggle_active.html.erb +++ b/app/views/schemes/toggle_active.html.erb @@ -11,7 +11,7 @@ <%= form_with model: @scheme_deactivation_period, url: toggle_scheme_form_path(action, @scheme), method: "patch", local: true do |f| %>
- <% collection_start_date = FormHandler.instance.current_collection_start_date %> + <% collection_start_date = currently_crossover_period? ? previous_collection_start_date : current_collection_start_date %> <%= f.govuk_error_summary %> <%= f.govuk_radio_buttons_fieldset date_type_question(action), legend: { text: I18n.t("questions.scheme.toggle_active.apply_from") }, @@ -20,7 +20,7 @@ <%= govuk_warning_text text: I18n.t("warnings.scheme.#{action}.existing_logs") %> <%= f.govuk_radio_button date_type_question(action), "default", - label: { text: "From the start of the current collection period (#{collection_start_date.to_formatted_s(:govuk_date)})" } %> + label: { text: "From the start of the open collection period (#{collection_start_date.to_formatted_s(:govuk_date)})" } %> <%= f.govuk_radio_button date_type_question(action), "other", label: { text: "For tenancies starting after a certain date" }, diff --git a/config/locales/en.yml b/config/locales/en.yml index bcfe32f46..04ff5a2b5 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -589,10 +589,10 @@ en: postcode: "For example, SW1P 4DF." name: "This is how you refer to this location within your organisation" units: "A unit is the space being let. For example, the property might be a block of flats and the unit would be the specific flat being let. A unit can also be a bedroom in a shared house or flat. Do not include spaces used for staff." - toggle_active: "If the date is before %{date}, select ‘From the start of the current collection period’ because the previous period has now closed." + toggle_active: "If the date is before %{date}, select ‘From the start of the open collection period’ because the previous period has now closed." startdate: "For example, 27 3 2021" scheme: - toggle_active: "If the date is before %{date}, select ‘From the start of the current collection period’ because the previous period has now closed." + toggle_active: "If the date is before %{date}, select ‘From the start of the open collection period’ because the previous period has now closed." bulk_upload: needstype: "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." offered: "Do not include the offer that led to this letting. This is after the last tenancy ended. If the property is being offered for let for the first time, enter 0." diff --git a/spec/helpers/collection_time_helper_spec.rb b/spec/helpers/collection_time_helper_spec.rb index dad456e34..017d68551 100644 --- a/spec/helpers/collection_time_helper_spec.rb +++ b/spec/helpers/collection_time_helper_spec.rb @@ -110,7 +110,7 @@ RSpec.describe CollectionTimeHelper do end end - describe "#currently_crossover_period?", focus: true do + describe "#currently_crossover_period?" do subject(:result) { currently_crossover_period? } around do |example|