From 68f434f80cf7a4c9c7e8817b94a95335a00f8c53 Mon Sep 17 00:00:00 2001 From: MadeTech Dushan Date: Thu, 4 Nov 2021 14:53:19 +0000 Subject: [PATCH] make stlye of reset password page match design --- app/views/devise/passwords/new.html.erb | 24 ++++++++++++++++-------- app/views/devise/shared/_links.html.erb | 2 +- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/app/views/devise/passwords/new.html.erb b/app/views/devise/passwords/new.html.erb index 9b486b81b..332b2fe89 100644 --- a/app/views/devise/passwords/new.html.erb +++ b/app/views/devise/passwords/new.html.erb @@ -1,15 +1,23 @@ -

Forgot your password?

+<% content_for :before_content do %> + <%= link_to 'Back', :back, class: "govuk-back-link" %> +<% end %> <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %> - <%= render "devise/shared/error_messages", resource: resource %> +
+
+

Reset password

+ <%= render "devise/shared/error_messages", resource: resource %> -
- <%= f.label :email %>
- <%= f.email_field :email, autofocus: true, autocomplete: "email" %> -
+

Enter the email address you used to create your account.

+

We’ll email you a link to reset your password. This link will expire in 3 hours.

+ +
+ <%= f.label :email, "Email address", class: "govuk-label" %> + <%= f.email_field :email, autofocus: true, autocomplete: "email", class: "govuk-input" %> +
-
- <%= f.submit "Send me reset password instructions" %> + <%= f.submit "Send email", class: "govuk-button" %> +
<% end %> diff --git a/app/views/devise/shared/_links.html.erb b/app/views/devise/shared/_links.html.erb index f05ceea8c..e4019a560 100644 --- a/app/views/devise/shared/_links.html.erb +++ b/app/views/devise/shared/_links.html.erb @@ -1,5 +1,5 @@ <%- if controller_name != 'sessions' %> - <%= link_to "Log in", new_session_path(resource_name) %>
+

Already have an account?<%= link_to "Sign in", new_session_path(resource_name) %>.


<% end %> <%- if devise_mapping.registerable? && controller_name != 'registrations' %>