From 7971d7ac77c83717afcceaa1f476d1eb9afd5918 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sun, 2 Jul 2017 15:00:52 -0400 Subject: Styled password reset form --- app/views/users/passwords/edit.html.haml | 16 ++++++++++++++++ app/views/users/passwords/new.html.haml | 11 +++++++++++ 2 files changed, 27 insertions(+) create mode 100644 app/views/users/passwords/edit.html.haml create mode 100644 app/views/users/passwords/new.html.haml (limited to 'app/views/users') diff --git a/app/views/users/passwords/edit.html.haml b/app/views/users/passwords/edit.html.haml new file mode 100644 index 0000000..3d2d9ee --- /dev/null +++ b/app/views/users/passwords/edit.html.haml @@ -0,0 +1,16 @@ +%h2 Change your password += devise_error_messages! +#principal + = form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| + = f.hidden_field :reset_password_token + .field + = f.label :password, "New password" + - if @minimum_password_length + %em= "(#{@minimum_password_length} characters minimum)" + = f.password_field :password, autofocus: true, autocomplete: "off" + .field + = f.label :password_confirmation, "Confirm new password" + = f.password_field :password_confirmation, autocomplete: "off" + .submit-field + = f.submit "Change my password" +.navigation= link_to "← Back to thoughts", root_url diff --git a/app/views/users/passwords/new.html.haml b/app/views/users/passwords/new.html.haml new file mode 100644 index 0000000..03d3854 --- /dev/null +++ b/app/views/users/passwords/new.html.haml @@ -0,0 +1,11 @@ +%h2 Forgot your password? += devise_error_messages! +#principal + = form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| + .field + = f.label :email + = f.email_field :email, autofocus: true + .submit-field + = f.submit "Submit" +.navigation= link_to "Log in", new_session_path(resource_name) +.navigation= link_to "← Back to thoughts", root_url -- cgit 1.4.1