Skip to content

Commit

Permalink
Added eligibility route to preview page
Browse files Browse the repository at this point in the history
  • Loading branch information
syed87 committed Sep 25, 2023
1 parent 7a69db4 commit 7df24c7
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions app/views/support_interface/countries/preview.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,19 @@
<%= raw GovukMarkdown.render(@country.qualifications_information) %>
<% end %>

<% if @country.eligibility_skip_questions_changed? || @country.subject_limited_changed? %>
<h3 class="govuk-heading-s">Which route will applicants take through the eligibility checker?</h3>
<p class="govuk-body">
<% 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 %>
</p>
<% 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 %>
Expand Down

0 comments on commit 7df24c7

Please sign in to comment.