diff --git a/app/views/devise/two_factor_authentication/resend.html.erb b/app/views/devise/two_factor_authentication/resend.html.erb index 0c7cdd32a..b79158c3f 100644 --- a/app/views/devise/two_factor_authentication/resend.html.erb +++ b/app/views/devise/two_factor_authentication/resend.html.erb @@ -1,7 +1,7 @@ <% content_for :title, "Resend security code" %> <% content_for :before_content do %> - <%= govuk_back_link(href: "javascript:history.back()") %> + <%= govuk_back_link(href: :back) %> <% end %> <%= form_with(url: send("resend_code_#{resource_name}_two_factor_authentication_path"), html: { method: :get }) do |f| %> diff --git a/app/views/form/page.html.erb b/app/views/form/page.html.erb index 5469219e3..5ca19d0b9 100644 --- a/app/views/form/page.html.erb +++ b/app/views/form/page.html.erb @@ -1,7 +1,7 @@ <% content_for :title, @page.header.presence || @page.questions.first.header.html_safe %> <% content_for :before_content do %> - <%= govuk_back_link(href: "javascript:history.back()") %> + <%= govuk_back_link(href: :back) %> <% end %>
diff --git a/app/views/locations/availability.erb b/app/views/locations/availability.erb index 279c5110c..8a00ddc89 100644 --- a/app/views/locations/availability.erb +++ b/app/views/locations/availability.erb @@ -2,7 +2,6 @@ <% content_for :before_content do %> <%= govuk_back_link( - text: "Back", href: params[:referrer] == "check_answers" ? scheme_location_check_answers_path(@scheme, @location, route: params[:route]) : scheme_location_mobility_standards_path(@scheme, @location, route: params[:route]), ) %> <% end %> diff --git a/app/views/locations/check_answers.html.erb b/app/views/locations/check_answers.html.erb index 11272b5a9..b460ca464 100644 --- a/app/views/locations/check_answers.html.erb +++ b/app/views/locations/check_answers.html.erb @@ -3,7 +3,6 @@ <% content_for :before_content do %> <%= govuk_back_link( - text: "Back", href: case params[:route] when "locations" scheme_locations_path(@scheme) diff --git a/app/views/locations/index.html.erb b/app/views/locations/index.html.erb index 469768b11..7294b9729 100644 --- a/app/views/locations/index.html.erb +++ b/app/views/locations/index.html.erb @@ -4,7 +4,6 @@ <% content_for :before_content do %> <%= govuk_back_link( - text: "Back", href: "/schemes/#{@scheme.id}", ) %> <% end %> diff --git a/app/views/locations/local_authority.html.erb b/app/views/locations/local_authority.html.erb index 69b36b5be..347f85866 100644 --- a/app/views/locations/local_authority.html.erb +++ b/app/views/locations/local_authority.html.erb @@ -2,7 +2,6 @@ <% content_for :before_content do %> <%= govuk_back_link( - text: "Back", href: case params[:referrer] when "check_local_authority" scheme_location_check_answers_path(@scheme, @location, route: params[:route]) diff --git a/app/views/locations/mobility_standards.html.erb b/app/views/locations/mobility_standards.html.erb index 42bdb4bcf..da08f8bfa 100644 --- a/app/views/locations/mobility_standards.html.erb +++ b/app/views/locations/mobility_standards.html.erb @@ -2,7 +2,6 @@ <% content_for :before_content do %> <%= govuk_back_link( - text: "Back", href: params[:referrer] == "check_answers" ? scheme_location_check_answers_path(@scheme, @location, route: params[:route]) : scheme_location_type_of_unit_path(@scheme, @location, route: params[:route]), ) %> <% end %> diff --git a/app/views/locations/name.html.erb b/app/views/locations/name.html.erb index 322a1da22..e5853a71f 100644 --- a/app/views/locations/name.html.erb +++ b/app/views/locations/name.html.erb @@ -2,7 +2,6 @@ <% content_for :before_content do %> <%= govuk_back_link( - text: "Back", href: case params[:referrer] when "check_answers" scheme_location_check_answers_path(@scheme, @location, route: params[:route]) diff --git a/app/views/locations/postcode.html.erb b/app/views/locations/postcode.html.erb index 5ede463ad..fe0505926 100644 --- a/app/views/locations/postcode.html.erb +++ b/app/views/locations/postcode.html.erb @@ -2,7 +2,6 @@ <% content_for :before_content do %> <%= govuk_back_link( - text: "Back", href: if params[:referrer] == "check_answers" scheme_location_check_answers_path(@scheme, @location, route: params[:route]) else diff --git a/app/views/locations/show.html.erb b/app/views/locations/show.html.erb index 79876e5b8..299a19357 100644 --- a/app/views/locations/show.html.erb +++ b/app/views/locations/show.html.erb @@ -3,7 +3,6 @@ <% content_for :before_content do %> <%= govuk_back_link( - text: "Back", href: scheme_locations_path(@scheme), ) %> <% end %> diff --git a/app/views/locations/toggle_active.html.erb b/app/views/locations/toggle_active.html.erb index 5c030de89..b402192a9 100644 --- a/app/views/locations/toggle_active.html.erb +++ b/app/views/locations/toggle_active.html.erb @@ -3,7 +3,6 @@ <% content_for :before_content do %> <%= govuk_back_link( - text: "Back", href: scheme_location_path(@location.scheme, @location), ) %> <% end %> diff --git a/app/views/locations/type_of_unit.html.erb b/app/views/locations/type_of_unit.html.erb index 5ff4ed3f1..45b76ef67 100644 --- a/app/views/locations/type_of_unit.html.erb +++ b/app/views/locations/type_of_unit.html.erb @@ -2,7 +2,6 @@ <% content_for :before_content do %> <%= govuk_back_link( - text: "Back", href: params[:referrer] == "check_answers" ? scheme_location_check_answers_path(@scheme, @location, route: params[:route]) : scheme_location_units_path(@scheme, @location, route: params[:route]), ) %> <% end %> diff --git a/app/views/locations/units.html.erb b/app/views/locations/units.html.erb index 30a9b3eff..12365adbb 100644 --- a/app/views/locations/units.html.erb +++ b/app/views/locations/units.html.erb @@ -2,7 +2,6 @@ <% content_for :before_content do %> <%= govuk_back_link( - text: "Back", href: params[:referrer] == "check_answers" ? scheme_location_check_answers_path(@scheme, @location, route: params[:route]) : scheme_location_name_path(@scheme, @location, route: params[:route]), ) %> <% end %> diff --git a/app/views/schemes/confirm_secondary.html.erb b/app/views/schemes/confirm_secondary.html.erb index c145e573d..e267b3289 100644 --- a/app/views/schemes/confirm_secondary.html.erb +++ b/app/views/schemes/confirm_secondary.html.erb @@ -2,7 +2,6 @@ <% content_for :before_content do %> <%= govuk_back_link( - text: "Back", href: request.query_parameters["check_answers"] ? "/schemes/#{@scheme.id}/check-answers" : "/schemes/#{@scheme.id}/primary-client-group", ) %> <% end %> diff --git a/app/views/schemes/details.html.erb b/app/views/schemes/details.html.erb index 4d45213f3..0e4f3a7d9 100644 --- a/app/views/schemes/details.html.erb +++ b/app/views/schemes/details.html.erb @@ -1,10 +1,7 @@ <% content_for :title, "Create a new supported housing scheme" %> <% content_for :before_content do %> - <%= govuk_back_link( - text: "Back", - href: :back, - ) %> + <%= govuk_back_link(href: :back) %> <% end %> <%= form_for(@scheme, method: :patch) do |f| %> diff --git a/app/views/schemes/edit_name.html.erb b/app/views/schemes/edit_name.html.erb index 04e28c93a..1dc8bc147 100644 --- a/app/views/schemes/edit_name.html.erb +++ b/app/views/schemes/edit_name.html.erb @@ -1,10 +1,7 @@ <% content_for :title, "Scheme details" %> <% content_for :before_content do %> - <%= govuk_back_link( - text: "Back", - href: :back, - ) %> + <%= govuk_back_link(href: :back) %> <% end %> <%= form_for(@scheme, method: :patch) do |f| %> diff --git a/app/views/schemes/new.html.erb b/app/views/schemes/new.html.erb index ff4f4d3a9..aadb6f0aa 100644 --- a/app/views/schemes/new.html.erb +++ b/app/views/schemes/new.html.erb @@ -6,10 +6,7 @@ <% content_for :title, "Create a new supported housing scheme" %> <% content_for :before_content do %> - <%= govuk_back_link( - text: "Back", - href: "javascript:history.go(-1);", - ) %> + <%= govuk_back_link(href: :back) %> <% end %>

diff --git a/app/views/schemes/primary_client_group.html.erb b/app/views/schemes/primary_client_group.html.erb index 610e916f4..8fe852c89 100644 --- a/app/views/schemes/primary_client_group.html.erb +++ b/app/views/schemes/primary_client_group.html.erb @@ -7,10 +7,7 @@ <% end %> <% content_for :before_content do %> - <%= govuk_back_link( - text: "Back", - href: back_button_path, - ) %> + <%= govuk_back_link(href: back_button_path) %> <% end %> <%= form_for(@scheme, method: :patch) do |f| %> diff --git a/app/views/schemes/secondary_client_group.html.erb b/app/views/schemes/secondary_client_group.html.erb index 4f48dab00..fe292b1c2 100644 --- a/app/views/schemes/secondary_client_group.html.erb +++ b/app/views/schemes/secondary_client_group.html.erb @@ -2,7 +2,6 @@ <% content_for :before_content do %> <%= govuk_back_link( - text: "Back", href: request.query_parameters["check_answers"] ? "/schemes/#{@scheme.id}/check-answers" : "/schemes/#{@scheme.id}/confirm-secondary-client-group", ) %> <% end %> diff --git a/app/views/schemes/show.html.erb b/app/views/schemes/show.html.erb index 5ef55f9f4..beb4508e0 100644 --- a/app/views/schemes/show.html.erb +++ b/app/views/schemes/show.html.erb @@ -3,7 +3,6 @@ <% content_for :before_content do %> <%= govuk_back_link( - text: "Back", href: "/schemes", ) %> <% end %> diff --git a/app/views/schemes/support.html.erb b/app/views/schemes/support.html.erb index 0c06a059f..23948978b 100644 --- a/app/views/schemes/support.html.erb +++ b/app/views/schemes/support.html.erb @@ -2,7 +2,6 @@ <% content_for :before_content do %> <%= govuk_back_link( - text: "Back", href: request.query_parameters["check_answers"] ? "/schemes/#{@scheme.id}/check-answers" : "/schemes/#{@scheme.id}/secondary-client-group", ) %> <% end %> diff --git a/app/views/schemes/toggle_active.html.erb b/app/views/schemes/toggle_active.html.erb index 1b7507375..fb59b262e 100644 --- a/app/views/schemes/toggle_active.html.erb +++ b/app/views/schemes/toggle_active.html.erb @@ -3,7 +3,6 @@ <% content_for :before_content do %> <%= govuk_back_link( - text: "Back", href: scheme_details_path(@scheme), ) %> <% end %>