From ed3b8a710d0636ee2d6b6b9915d98301db15f782 Mon Sep 17 00:00:00 2001 From: Paul Robert Lloyd Date: Mon, 29 Nov 2021 17:13:04 +0000 Subject: [PATCH] Use govuk_back_link helper --- app/views/devise/passwords/new.html.erb | 5 ++++- app/views/devise/registrations/edit.html.erb | 5 ++++- app/views/form/page.html.erb | 5 ++++- app/views/users/account/personal_details.html.erb | 5 ++++- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/app/views/devise/passwords/new.html.erb b/app/views/devise/passwords/new.html.erb index 332b2fe89..8422e3349 100644 --- a/app/views/devise/passwords/new.html.erb +++ b/app/views/devise/passwords/new.html.erb @@ -1,5 +1,8 @@ <% content_for :before_content do %> - <%= link_to 'Back', :back, class: "govuk-back-link" %> + <%= govuk_back_link( + text: 'Back', + href: :back, + ) %> <% end %> <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %> diff --git a/app/views/devise/registrations/edit.html.erb b/app/views/devise/registrations/edit.html.erb index e94eb88ca..48654e239 100644 --- a/app/views/devise/registrations/edit.html.erb +++ b/app/views/devise/registrations/edit.html.erb @@ -1,5 +1,8 @@ <% content_for :before_content do %> - <%= link_to 'Back', :back, class: "govuk-back-link" %> + <%= govuk_back_link( + text: 'Back', + href: :back, + ) %> <% end %> <%= form_for(resource, as: resource_name, url: user_registration_path(), html: { method: :patch }) do |f| %> diff --git a/app/views/form/page.html.erb b/app/views/form/page.html.erb index 0eee408e7..744dfa503 100644 --- a/app/views/form/page.html.erb +++ b/app/views/form/page.html.erb @@ -1,5 +1,8 @@ <% content_for :before_content do %> - <%= link_to 'Back', 'javascript:history.back()', class: "govuk-back-link" %> + <%= govuk_back_link( + text: 'Back', + href: 'javascript:history.back()', + ) %> <% end %> <%= turbo_frame_tag "case_log_form", target: "_top" do %> diff --git a/app/views/users/account/personal_details.html.erb b/app/views/users/account/personal_details.html.erb index 9f3640aaf..801575821 100644 --- a/app/views/users/account/personal_details.html.erb +++ b/app/views/users/account/personal_details.html.erb @@ -1,5 +1,8 @@ <% content_for :before_content do %> - <%= link_to 'Back', :back, class: "govuk-back-link" %> + <%= govuk_back_link( + text: 'Back', + href: :back, + ) %> <% end %> <%= form_for(current_user, as: :user, url: account_update_path(), html: { method: :patch }) do |f| %>