Browse Source

Add skip link and lint

pull/1584/head
Kat 3 years ago
parent
commit
1992515c6c
  1. 6
      app/views/form/_interruption_screen_question.html.erb
  2. 2
      app/views/form/page.html.erb

6
app/views/form/_interruption_screen_question.html.erb

@ -48,4 +48,10 @@
<% end %> <% end %>
<%= f.hidden_field question.id, value: "0" %> <%= f.hidden_field question.id, value: "0" %>
<div class="govuk-button-group">
<%= f.govuk_submit "Save and continue" %> <%= f.govuk_submit "Save and continue" %>
<%= govuk_link_to(
(@page.skip_text || "Skip for now"),
(@page.skip_href(@log) || send(@log.form.next_page_redirect_path(@page, @log, current_user), @log)),
) %>
</div>

2
app/views/form/page.html.erb

@ -7,7 +7,7 @@
<div data-controller="govukfrontend"></div> <div data-controller="govukfrontend"></div>
<%= form_with model: @log, url: request.original_url, method: "post", local: true do |f| %> <%= form_with model: @log, url: request.original_url, method: "post", local: true do |f| %>
<div class="govuk-grid-row"> <div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds-from-desktop" %> <div class="govuk-grid-column-two-thirds-from-desktop">
<% remove_other_page_errors(@log, @page) %> <% remove_other_page_errors(@log, @page) %>
<%= f.govuk_error_summary %> <%= f.govuk_error_summary %>

Loading…
Cancel
Save