From acd4268991e290f4fd34207b15974ac4c9777dc5 Mon Sep 17 00:00:00 2001 From: Andrey Bakanovsky Date: Thu, 31 Aug 2023 21:15:46 +0300 Subject: [PATCH] feat(password): update the password recovery page (#48) --- app/views/devise/passwords/new.html.erb | 16 ---------------- app/views/devise/passwords/new.html.slim | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 16 deletions(-) delete mode 100644 app/views/devise/passwords/new.html.erb create mode 100644 app/views/devise/passwords/new.html.slim diff --git a/app/views/devise/passwords/new.html.erb b/app/views/devise/passwords/new.html.erb deleted file mode 100644 index 9b486b81..00000000 --- a/app/views/devise/passwords/new.html.erb +++ /dev/null @@ -1,16 +0,0 @@ -

Forgot your password?

- -<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %> - <%= render "devise/shared/error_messages", resource: resource %> - -
- <%= f.label :email %>
- <%= f.email_field :email, autofocus: true, autocomplete: "email" %> -
- -
- <%= f.submit "Send me reset password instructions" %> -
-<% end %> - -<%= render "devise/shared/links" %> diff --git a/app/views/devise/passwords/new.html.slim b/app/views/devise/passwords/new.html.slim new file mode 100644 index 00000000..cb6c508a --- /dev/null +++ b/app/views/devise/passwords/new.html.slim @@ -0,0 +1,17 @@ +.columns.is-centered + .column.is-one-third + h2.title.is-4.has-text-centered Forgot your password? + = form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| + = render "devise/shared/error_messages", resource: resource + .field + = f.email_field :email, autofocus: true, autocomplete: "email", placeholder: "email" + br + .actions + div.is-fullwidth + = f.submit 'Send me reset password instructions', class: "button is-info is-fullwidth" + br + .columns + .column.is-one-quarters + = link_to t(".sign_in"), new_session_path(resource_name) + .column.is-flex.is-justify-content-flex-end + = link_to t(".sign_up"), new_registration_path(resource_name)