diff --git a/app/models/form.rb b/app/models/form.rb index 5f6544086..179c56526 100644 --- a/app/models/form.rb +++ b/app/models/form.rb @@ -61,7 +61,7 @@ class Form page_ids = subsection_for_page(page).pages.map(&:id) page_index = page_ids.index(page.id) - page_id = if page.id.include?("value_check") && log[page.questions[0].id] == 1 && page.routed_to?(log, current_user) + page_id = if page.interruption_screen? && log[page.questions[0].id] == 1 && page.routed_to?(log, current_user) previous_page(page_ids, page_index, log, current_user) else page_ids[page_index + 1] diff --git a/app/views/form/page.html.erb b/app/views/form/page.html.erb index 7a860c1db..c7b18cdda 100644 --- a/app/views/form/page.html.erb +++ b/app/views/form/page.html.erb @@ -44,7 +44,7 @@ <%= f.hidden_field :page, value: @page.id %>
- <% if !@page.id.include?("value_check") && if request.query_parameters["referrer"] != "check_answers" %> + <% if !@page.interruption_screen? && if request.query_parameters["referrer"] != "check_answers" %> <%= f.govuk_submit "Save and continue" %> <%= govuk_link_to "Skip for now", send(@log.form.next_page_redirect_path(@page, @log, current_user), @log) %> <% else %>