Browse Source

Clear scheme filters from scheme question

pull/2528/head
Manny Dinssa 2 years ago
parent
commit
7501199e17
  1. 2
      app/controllers/schemes_controller.rb
  2. 2
      app/views/form/guidance/_finding_scheme.erb

2
app/controllers/schemes_controller.rb

@ -15,6 +15,8 @@ class SchemesController < ApplicationController
redirect_to schemes_organisation_path(current_user.organisation) unless current_user.support?
all_visible_schemes = Scheme.visible
redirect_to clear_filters_url(filter_type: "schemes") and return if params[:reset] == "true"
@pagy, @schemes = pagy(filter_manager.filtered_schemes(all_visible_schemes, search_term, session_filters))
@searched = search_term.presence
@total_count = all_visible_schemes.size

2
app/views/form/guidance/_finding_scheme.erb

@ -1,6 +1,6 @@
<%= govuk_details(summary_text: "Can’t find your scheme?") do %>
<p class="govuk-body">Schemes are attached to the organisation that owns the property. Check you have correctly answered question 1 "Which organisation owns this property?"</p>
<p class="govuk-body">If your organisation’s schemes were migrated from old CORE, they may have new names and codes. Search by postcode to find your scheme.</p>
<p class="govuk-body"><%= govuk_link_to("View your organisation’s schemes", schemes_path) %></p>
<p class="govuk-body"><%= govuk_link_to("View your organisation’s schemes", schemes_path(reset: true)) %></p>
<p class="govuk-body"><%= govuk_link_to("Read more about how schemes have changed", scheme_changes_path) %></p>
<% end %>

Loading…
Cancel
Save