diff --git a/app/controllers/pages/routes_controller.rb b/app/controllers/pages/routes_controller.rb
index c3130e8c23..bc3ec20a14 100644
--- a/app/controllers/pages/routes_controller.rb
+++ b/app/controllers/pages/routes_controller.rb
@@ -1,9 +1,8 @@
class Pages::RoutesController < PagesController
def show
- back_link_url = form_pages_path(current_form.id)
route_summary_card_data_presenter = RouteSummaryCardDataPresenter.new(form: current_form, page:)
- render locals: { current_form:, page:, back_link_url:, route_summary_card_data_presenter: }
+ render locals: { current_form:, page:, route_summary_card_data_presenter: }
end
def delete
diff --git a/app/views/pages/_form.html.erb b/app/views/pages/_form.html.erb
index c5bb4c03b8..bb4b646127 100644
--- a/app/views/pages/_form.html.erb
+++ b/app/views/pages/_form.html.erb
@@ -71,7 +71,7 @@
<% end %>
<% end %>
- <%= govuk_link_to t('pages.go_to_your_questions'), form_pages_path(form_object.id) %>
+ <%= govuk_link_to t('pages.back_to_your_questions'), form_pages_path(form_object.id) %>
<% end %>
diff --git a/app/views/pages/address_settings.html.erb b/app/views/pages/address_settings.html.erb
index 0b6585ee2d..df29034cb2 100644
--- a/app/views/pages/address_settings.html.erb
+++ b/app/views/pages/address_settings.html.erb
@@ -13,7 +13,7 @@
<% end %>
- <%= govuk_link_to t('pages.go_to_your_questions'), form_pages_path(current_form.id) %>
+ <%= govuk_link_to t('pages.back_to_your_questions'), form_pages_path(current_form.id) %>
diff --git a/app/views/pages/change_order.html.erb b/app/views/pages/change_order.html.erb
index 6b221bc4fc..69b2022af4 100644
--- a/app/views/pages/change_order.html.erb
+++ b/app/views/pages/change_order.html.erb
@@ -1,5 +1,5 @@
<% set_page_title(title_with_error_prefix(t("page_titles.change_page_order"), @change_order_input.errors.any?)) %>
-<% content_for :back_link, govuk_back_link_to(form_pages_path(@change_order_input.form.id), t("pages.change_order.back_link")) %>
+<% content_for :back_link, govuk_back_link_to(form_pages_path(@change_order_input.form.id), t("back_link.form_pages")) %>
diff --git a/app/views/pages/conditions/routing_page.html.erb b/app/views/pages/conditions/routing_page.html.erb
index 828b3126be..7274269e18 100644
--- a/app/views/pages/conditions/routing_page.html.erb
+++ b/app/views/pages/conditions/routing_page.html.erb
@@ -17,7 +17,7 @@
<% end %>
- <%= govuk_link_to t('pages.go_to_your_questions'), form_pages_path(form.id) %>
+ <%= govuk_link_to t('pages.back_to_your_questions'), form_pages_path(form.id) %>
diff --git a/app/views/pages/date_settings.html.erb b/app/views/pages/date_settings.html.erb
index d45a0132be..c862cbca0f 100644
--- a/app/views/pages/date_settings.html.erb
+++ b/app/views/pages/date_settings.html.erb
@@ -17,7 +17,7 @@
<% end %>
- <%= govuk_link_to t('pages.go_to_your_questions'), form_pages_path(current_form.id) %>
+ <%= govuk_link_to t('pages.back_to_your_questions'), form_pages_path(current_form.id) %>
diff --git a/app/views/pages/edit.html.erb b/app/views/pages/edit.html.erb
index 3f45cae278..d0730a9170 100644
--- a/app/views/pages/edit.html.erb
+++ b/app/views/pages/edit.html.erb
@@ -12,7 +12,7 @@
<% end %>
- <%= govuk_link_to t("pages.go_to_your_questions"), form_pages_path(current_form.id) %>
+ <%= govuk_link_to t("pages.back_to_your_questions"), form_pages_path(current_form.id) %>
<% end%>
diff --git a/app/views/pages/guidance.html.erb b/app/views/pages/guidance.html.erb
index 57379fd6c5..aacc139ab3 100644
--- a/app/views/pages/guidance.html.erb
+++ b/app/views/pages/guidance.html.erb
@@ -39,7 +39,7 @@
<% end %>
- <%= govuk_link_to t('pages.go_to_your_questions'), form_pages_path(current_form.id) %>
+ <%= govuk_link_to t('pages.back_to_your_questions'), form_pages_path(current_form.id) %>
diff --git a/app/views/pages/name_settings.html.erb b/app/views/pages/name_settings.html.erb
index 510aee4131..bbe1ef4033 100644
--- a/app/views/pages/name_settings.html.erb
+++ b/app/views/pages/name_settings.html.erb
@@ -32,7 +32,7 @@
<% end %>
- <%= govuk_link_to t('pages.go_to_your_questions'), form_pages_path(current_form.id) %>
+ <%= govuk_link_to t('pages.back_to_your_questions'), form_pages_path(current_form.id) %>
diff --git a/app/views/pages/question_text.html.erb b/app/views/pages/question_text.html.erb
index 9482cc40f2..ccb2562298 100644
--- a/app/views/pages/question_text.html.erb
+++ b/app/views/pages/question_text.html.erb
@@ -10,7 +10,7 @@
<% end %>
- <%= govuk_link_to t('pages.go_to_your_questions'), form_pages_path(current_form.id) %>
+ <%= govuk_link_to t('pages.back_to_your_questions'), form_pages_path(current_form.id) %>
diff --git a/app/views/pages/routes/show.html.erb b/app/views/pages/routes/show.html.erb
index 3f886a080f..63df824e70 100644
--- a/app/views/pages/routes/show.html.erb
+++ b/app/views/pages/routes/show.html.erb
@@ -1,5 +1,5 @@
<% set_page_title(title_with_error_prefix(t('page_titles.routes_show', question_number: page.position), false)) %>
-<% content_for :back_link, govuk_back_link_to(back_link_url, t('pages.go_to_your_questions')) %>
+<% content_for :back_link, govuk_back_link_to(form_pages_path(current_form.id), t('back_link.form_pages')) %>
@@ -42,6 +42,6 @@
<% end %>
- <%= govuk_link_to t("pages.go_to_your_questions"), form_pages_path(current_form.id) %>
+ <%= govuk_link_to t("pages.back_to_your_questions"), form_pages_path(current_form.id) %>
diff --git a/app/views/pages/selection/bulk_options.html.erb b/app/views/pages/selection/bulk_options.html.erb
index 7566d31f1b..c5fac075c2 100644
--- a/app/views/pages/selection/bulk_options.html.erb
+++ b/app/views/pages/selection/bulk_options.html.erb
@@ -33,7 +33,7 @@
<% end %>
- <%= govuk_link_to t('pages.go_to_your_questions'), form_pages_path(current_form.id) %>
+ <%= govuk_link_to t('pages.back_to_your_questions'), form_pages_path(current_form.id) %>
diff --git a/app/views/pages/selection/none_of_the_above.html.erb b/app/views/pages/selection/none_of_the_above.html.erb
index 533076dcf4..8827456510 100644
--- a/app/views/pages/selection/none_of_the_above.html.erb
+++ b/app/views/pages/selection/none_of_the_above.html.erb
@@ -23,7 +23,7 @@
<% end %>
- <%= govuk_link_to t('pages.go_to_your_questions'), form_pages_path(current_form.id) %>
+ <%= govuk_link_to t('pages.back_to_your_questions'), form_pages_path(current_form.id) %>
diff --git a/app/views/pages/selection/options.html.erb b/app/views/pages/selection/options.html.erb
index c340e78c0c..5abb3883ba 100644
--- a/app/views/pages/selection/options.html.erb
+++ b/app/views/pages/selection/options.html.erb
@@ -57,7 +57,7 @@
<% end %>
- <%= govuk_link_to t('pages.go_to_your_questions'), form_pages_path(current_form.id) %>
+ <%= govuk_link_to t('pages.back_to_your_questions'), form_pages_path(current_form.id) %>
diff --git a/app/views/pages/selection/type.html.erb b/app/views/pages/selection/type.html.erb
index a13af9bdea..0a8a096348 100644
--- a/app/views/pages/selection/type.html.erb
+++ b/app/views/pages/selection/type.html.erb
@@ -39,7 +39,7 @@
<% end %>
- <%= govuk_link_to t('pages.go_to_your_questions'), form_pages_path(current_form.id) %>
+ <%= govuk_link_to t('pages.back_to_your_questions'), form_pages_path(current_form.id) %>
diff --git a/app/views/pages/text_settings.html.erb b/app/views/pages/text_settings.html.erb
index 8f93361b18..f393e2c7d8 100644
--- a/app/views/pages/text_settings.html.erb
+++ b/app/views/pages/text_settings.html.erb
@@ -17,7 +17,7 @@
<% end %>
- <%= govuk_link_to t('pages.go_to_your_questions'), form_pages_path(current_form.id) %>
+ <%= govuk_link_to t('pages.back_to_your_questions'), form_pages_path(current_form.id) %>
diff --git a/app/views/pages/type_of_answer.html.erb b/app/views/pages/type_of_answer.html.erb
index f0456a62d1..171ddc90d9 100644
--- a/app/views/pages/type_of_answer.html.erb
+++ b/app/views/pages/type_of_answer.html.erb
@@ -28,7 +28,7 @@
<% end %>
- <%= govuk_link_to t('pages.go_to_your_questions'), form_pages_path(current_form.id) %>
+ <%= govuk_link_to t('pages.back_to_your_questions'), form_pages_path(current_form.id) %>
diff --git a/app/views/routes/show.html.erb b/app/views/routes/show.html.erb
index 01c9cc7a67..bbbad52261 100644
--- a/app/views/routes/show.html.erb
+++ b/app/views/routes/show.html.erb
@@ -1,5 +1,5 @@
<% set_page_title(t("page_titles.routes")) %>
-<% content_for :back_link, govuk_back_link_to(form_pages_path(@current_form.id), t("back_link.form_view")) %>
+<% content_for :back_link, govuk_back_link_to(form_pages_path(@current_form.id), t("back_link.form_pages")) %>
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 1afb8dc77b..f4a8c6d980 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -222,6 +222,7 @@ en:
back_link:
form_create: Back to create your form
form_edit: Back to edit your form
+ form_pages: Back to your questions
form_view: Back to your form
forms: Back to your forms
group: Back to %{group_name}
@@ -1606,8 +1607,8 @@ en:
your_welsh_form_is_live: Your Welsh form is live
pages:
answer_settings: Answer settings
+ back_to_your_questions: Back to your questions
change_order:
- back_link: Back to Add and edit your questions
move_question_to_label: Move question %{position} to (optional)
preview_banner: You need to save this question order if you want to keep these changes
preview_button: Preview new question order
@@ -1674,7 +1675,6 @@ en:
edit:
back_link: Back to edit route 1
delete_exit_page: Delete exit page
- go_to_your_questions: Back to your questions
heading: Edit question
index:
add_a_question_route: Add a question route
diff --git a/spec/views/pages/routes/show.html.erb_spec.rb b/spec/views/pages/routes/show.html.erb_spec.rb
index d5d9f04c96..ec60b2fc04 100644
--- a/spec/views/pages/routes/show.html.erb_spec.rb
+++ b/spec/views/pages/routes/show.html.erb_spec.rb
@@ -26,7 +26,7 @@
context "when there are no routes" do
before do
- render template: "pages/routes/show", locals: { current_form: form, page:, back_link_url: "/back", route_summary_card_data_presenter: route_summary_card_data_service }
+ render template: "pages/routes/show", locals: { current_form: form, page:, route_summary_card_data_presenter: route_summary_card_data_service }
end
it "has the correct title" do
@@ -34,7 +34,7 @@
end
it "has the correct back link" do
- expect(view.content_for(:back_link)).to have_link(I18n.t("pages.go_to_your_questions"), href: "/back")
+ expect(view.content_for(:back_link)).to have_link(I18n.t("back_link.form_pages"), href: form_pages_path(form.id))
end
it "has the correct heading and caption" do
@@ -53,7 +53,7 @@
end
it "has a back to questions link" do
- expect(rendered).to have_link(I18n.t("pages.go_to_your_questions"), href: form_pages_path(form.id))
+ expect(rendered).to have_link(I18n.t("pages.back_to_your_questions"), href: form_pages_path(form.id))
end
it "does not have a link to delete all routes" do
@@ -68,7 +68,7 @@
create :condition, routing_page_id: pages.first.id, check_page_id: pages.first.id, answer_value: "Option 1", goto_page_id: pages.third.id
pages.each(&:reload)
- render template: "pages/routes/show", locals: { current_form: form, page:, back_link_url: "/back", route_summary_card_data_presenter: route_summary_card_data_service }
+ render template: "pages/routes/show", locals: { current_form: form, page:, route_summary_card_data_presenter: route_summary_card_data_service }
end
it "does not have a link to delete all routes" do
@@ -120,7 +120,7 @@
create :condition, :with_exit_page, routing_page_id: page.id, check_page_id: page.id, answer_value: "Option 1"
pages.each(&:reload)
- render template: "pages/routes/show", locals: { current_form: form, page:, back_link_url: "/back", route_summary_card_data_presenter: route_summary_card_data_service }
+ render template: "pages/routes/show", locals: { current_form: form, page:, route_summary_card_data_presenter: route_summary_card_data_service }
end
it "does not show the link to set questions to skip" do
@@ -140,7 +140,7 @@
create :condition, routing_page_id: pages.second.id, check_page_id: pages.first.id, goto_page_id: pages.fourth.id
pages.each(&:reload)
- render template: "pages/routes/show", locals: { current_form: form, page:, back_link_url: "/back", route_summary_card_data_presenter: route_summary_card_data_service }
+ render template: "pages/routes/show", locals: { current_form: form, page:, route_summary_card_data_presenter: route_summary_card_data_service }
end
it "has a link to delete all routes" do
@@ -157,7 +157,7 @@
let(:errors) { [OpenStruct.new(link: "goto-1", message: "Error text")] }
before do
- render template: "pages/routes/show", locals: { current_form: form, page:, back_link_url: "/back", route_summary_card_data_presenter: route_summary_card_data_service }
+ render template: "pages/routes/show", locals: { current_form: form, page:, route_summary_card_data_presenter: route_summary_card_data_service }
end
it "shows the error message" do
diff --git a/spec/views/routes/show.html.erb_spec.rb b/spec/views/routes/show.html.erb_spec.rb
index 5ec81a0147..d247d635ae 100644
--- a/spec/views/routes/show.html.erb_spec.rb
+++ b/spec/views/routes/show.html.erb_spec.rb
@@ -18,7 +18,7 @@ def render_page
it "has the correct back link" do
render_page
- expect(view.content_for(:back_link)).to have_link("Back to your form", href: form_pages_path(form.id))
+ expect(view.content_for(:back_link)).to have_link("Back to your questions", href: form_pages_path(form.id))
end
it "has the correct heading and caption" do