% content_for :title, "What is the other client group?" %>
<% content_for :before_content do %>
<%= govuk_back_link(href: scheme_back_button_path(@scheme, "secondary_client_group")) %>
<% end %>
<%= form_for(@scheme, method: :patch) do |f| %>
<%= f.govuk_error_summary %>
<%= render partial: "organisations/headings", locals: { main: "What is the other 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? %>
<% secondary_client_group_selection = Scheme.secondary_client_groups.keys.excluding("Missing", @scheme.primary_client_group).map { |key, _| OpenStruct.new(id: key, name: key) } %>
<%= f.govuk_collection_radio_buttons :secondary_client_group,
secondary_client_group_selection,
:id,
:name,
legend: nil %>
<%= f.hidden_field :page, value: "secondary-client-group" %>
<% 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 %>
<% end %>