@ -23,12 +23,4 @@ module SchemesHelper
end
base_attributes
def availability_text(scheme)
base_text = "Available from #{scheme.available_from.to_formatted_s(:govuk_date)}"
if scheme.deactivation_date.present?
base_text += "\nDeactivation date #{scheme.deactivation_date.to_formatted_s(:govuk_date)}"
base_text
@ -28,7 +28,7 @@
**basic_conditional_html_attributes({ "deactivation_date" => %w[other] }, "location") do %>
<%= f.govuk_date_field :deactivation_date,
legend: { text: "Date", size: "m" },
hint: { text: "For example, 27 3 2008" },
hint: { text: "For example, 27 3 2022" },
width: 20 %>
<% end %>
@ -4,7 +4,7 @@
<h1 class="govuk-heading-l">
<span class="govuk-caption-l"><%= @location.postcode %></span>
<%= "This change will affect #{@location.lettings_logs.count} logs" %>
This change will affect <%= @location.lettings_logs.count %> logs
</h1>
<%= govuk_warning_text text: I18n.t("warnings.location.deactivation.review_logs") %>
<%= f.hidden_field :confirm, value: true %>
@ -30,4 +30,5 @@
<%= govuk_button_link_to "Deactivate this scheme", scheme_deactivate_path(@scheme), warning: true %>
<% else %>
<%= govuk_button_link_to "Reactivate this scheme", scheme_reactivate_path(@scheme) %>
<% end %><% end %>
@ -25,7 +25,7 @@
**basic_conditional_html_attributes({ "deactivation_date" => %w[other] }, "scheme") do %>
@ -6,7 +6,7 @@
<span class="govuk-caption-l"><%= @scheme.service_name %></span>
<%= "This change will affect #{@scheme.lettings_logs.count} logs" %>
This change will affect <%= @scheme.lettings_logs.count %> logs
<%= govuk_warning_text text: I18n.t("warnings.scheme.deactivation.review_logs") %>