From 7df24c730eb4472a62ab0f6364418b1a825ae38a Mon Sep 17 00:00:00 2001 From: Shujat Khalid Date: Mon, 25 Sep 2023 17:26:49 +0100 Subject: [PATCH] Added eligibility route to preview page --- .../support_interface/countries/preview.html.erb | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/app/views/support_interface/countries/preview.html.erb b/app/views/support_interface/countries/preview.html.erb index dbd54f324e..ae4d9b9287 100644 --- a/app/views/support_interface/countries/preview.html.erb +++ b/app/views/support_interface/countries/preview.html.erb @@ -53,6 +53,19 @@ <%= raw GovukMarkdown.render(@country.qualifications_information) %> <% end %> +<% if @country.eligibility_skip_questions_changed? || @country.subject_limited_changed? %> +

Which route will applicants take through the eligibility checker?

+

+ <% if @country.subject_limited %> + <%= govuk_tag(text: "Subject limited", colour: "yellow", classes: ["govuk-!-margin-left-2"]) %> + <% elsif @country.eligibility_skip_questions %> + <%= govuk_tag(text: "Reduced eligibility", colour: "yellow", classes: ["govuk-!-margin-left-2"]) %> + <% else %> + <%= govuk_tag(text: "Standard eligibility", colour: "grey", classes: ["govuk-!-margin-left-2"]) %> + <% end %> +

+<% end %> + <%= form_with model: @form, url: [:support_interface, @country], method: :put do |f| %> <%= f.hidden_field :eligibility_enabled, value: @form.eligibility_enabled %> <%= f.hidden_field :eligibility_skip_questions, value: @form.eligibility_skip_questions %>