|
|
|
<%= form_for(@scheme, as: :scheme, method: :patch) do |f| %>
|
|
|
|
<%= f.govuk_error_summary %>
|
|
|
|
|
|
|
|
<% content_for :title, "Check your answers before creating this scheme" %>
|
|
|
|
<%= render partial: "organisations/headings", locals: { main: "Check your changes before creating this scheme", sub: @scheme.service_name } %>
|
|
|
|
|
|
|
|
<%= govuk_tabs(title: "Check your answers before creating this scheme") do |component| %>
|
|
|
|
<% component.with_tab(label: "Scheme") do %>
|
|
|
|
<h2 class="govuk-visually-hidden">Scheme</h2>
|
|
|
|
<dl class="govuk-summary-list">
|
|
|
|
<% @scheme.check_details_attributes.each do |attr| %>
|
|
|
|
<% if attr[:name] != "Status" && (attr[:id] != "secondary_client_group" || @scheme.has_other_client_group == "Yes") %>
|
|
|
|
<%= render partial: "scheme_summary_list_row", locals: { scheme: @scheme, attribute: attr, change_link: change_answer_link(@scheme, attr[:id], current_user) } %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</dl>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<%= f.hidden_field :page, value: "check-answers" %>
|
|
|
|
<%= f.hidden_field :confirmed, value: "true" %>
|
|
|
|
<% button_label = @scheme.confirmed? ? "Save" : "Create scheme" %>
|
|
|
|
|
|
|
|
<% if SchemePolicy.new(current_user, @scheme).create? %>
|
|
|
|
<%= f.govuk_submit button_label %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<% if SchemePolicy.new(current_user, @scheme).delete? && FeatureToggle.delete_scheme_enabled? %>
|
|
|
|
<%= delete_scheme_link(@scheme) %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|