<% content_for :title, "Does this scheme provide for another client group?" %>

<% content_for :before_content do %>
  <%= govuk_back_link(href: scheme_back_button_path(@scheme, "confirm_secondary_client_group")) %>
<% end %>

<%= render partial: "organisations/headings", locals: { main: "Does this scheme provide for another client group?", sub: @scheme.service_name } %>
<%= govuk_inset_text(text: "Only update a scheme if you’re fixing an error. If the scheme is changing,  create a new scheme.") if @scheme.confirmed? %>

<%= form_for(@scheme, method: :patch) do |f| %>
  <div class="govuk-grid-row">
    <div class="govuk-grid-column-two-thirds">
     <%= f.govuk_error_summary %>

      <% selection = [OpenStruct.new(id: "Yes", name: "Yes"), OpenStruct.new(id: "No", name: "No")] %>
      <%= f.govuk_collection_radio_buttons :has_other_client_group,
        selection,
        :id,
        :name,
        legend: nil %>

      <%= f.hidden_field :page, value: "confirm-secondary" %>
      <% if params[:referrer] == "check-answers" %>
        <%= f.hidden_field :check_answers, value: "true" %>
        <%= f.govuk_submit "Save changes" %>
      <% else %>
        <%= f.govuk_submit "Save and continue" %>
      <% end %>
    </div>
  </div>
<% end %>