app/views/idv/cancellations/new.html.erb
<% self.title = t('titles.idv.cancellation_prompt') %>
<%= render StatusPageComponent.new(status: :warning) do |c| %>
<% if @hybrid_session %>
<% c.with_header { t('idv.cancel.headings.prompt.hybrid') } %>
<p><%= t('idv.cancel.description.hybrid') %></p>
<% c.with_action_button(
url: idv_cancel_path(step: params[:step], location: 'cancel'),
method: :delete,
).with_content(t('forms.buttons.cancel')) %>
<% c.with_action_button(
url: idv_cancel_path(step: params[:step]),
method: :put,
outline: true,
).with_content(t('links.go_back')) %>
<% else %>
<% c.with_header { t('idv.cancel.headings.prompt.standard') } %>
<h2 class="margin-top-4 margin-bottom-2"><%= t('idv.cancel.headings.start_over') %></h2>
<p><%= t('idv.cancel.description.start_over') %></p>
<div class="margin-top-4">
<%= render ButtonComponent.new(
url: idv_session_path(step: params[:step]),
method: :delete,
big: true,
wide: true,
form: { 'aria-label': t('idv.cancel.actions.start_over') },
).with_content(t('idv.cancel.actions.start_over'))
%>
<div class="margin-top-2">
<%= render ButtonComponent.new(
url: idv_cancel_path(step: params[:step]),
method: :put,
big: true,
wide: true,
outline: true,
form: { 'aria-label': t('idv.cancel.actions.keep_going') },
).with_content(t('idv.cancel.actions.keep_going')) %>
</div>
</div>
<hr class="margin-y-5" />
<h2 class="margin-top-4 margin-bottom-2"><%= @presenter.exit_heading %></h2>
<% @presenter.exit_description.each do |p_content| %>
<p><%= p_content %></p>
<% end %>
<div class="margin-top-4">
<%= render SpinnerButtonComponent.new(
url: idv_cancel_path(step: params[:step], location: 'cancel'),
method: :delete,
big: true,
wide: true,
outline: true,
form: {
"aria-label": @presenter.exit_action_text,
data: { form_steps_wait: '' },
},
).with_content(@presenter.exit_action_text) %>
</div>
<% end %>
<% end %>
<% javascript_packs_tag_once 'form-steps-wait' %>