Browse Source

make stlye of reset password page match design

pull/81/head
MadeTech Dushan 3 years ago
parent
commit
68f434f80c
  1. 20
      app/views/devise/passwords/new.html.erb
  2. 2
      app/views/devise/shared/_links.html.erb

20
app/views/devise/passwords/new.html.erb

@ -1,15 +1,23 @@
<h2>Forgot your password?</h2>
<% 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| %>
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<h1 class="govuk-heading-l">Reset password</h1>
<%= render "devise/shared/error_messages", resource: resource %>
<div class="field">
<%= f.label :email %><br />
<%= f.email_field :email, autofocus: true, autocomplete: "email" %>
<p class="govuk-body">Enter the email address you used to create your account.</p>
<p class="govuk-body">We’ll email you a link to reset your password. This link will expire in 3 hours.</p>
<div class="govuk-form-group">
<%= f.label :email, "Email address", class: "govuk-label" %>
<%= f.email_field :email, autofocus: true, autocomplete: "email", class: "govuk-input" %>
</div>
<div class="actions">
<%= f.submit "Send me reset password instructions" %>
<%= f.submit "Send email", class: "govuk-button" %>
</div>
</div>
<% end %>

2
app/views/devise/shared/_links.html.erb

@ -1,5 +1,5 @@
<%- if controller_name != 'sessions' %>
<%= link_to "Log in", new_session_path(resource_name) %><br />
<p class="govuk-body">Already have an account?<%= link_to "Sign in", new_session_path(resource_name) %>.</p><br />
<% end %>
<%- if devise_mapping.registerable? && controller_name != 'registrations' %>

Loading…
Cancel
Save