Skip to content

Commit 69e8d6e

Browse files
authored
refactor: Redesigns password reset pages (#308)
* refactor: Redesigns password reset pages * fix: Hound newline issue
1 parent 03e632c commit 69e8d6e

File tree

4 files changed

+21
-16
lines changed

4 files changed

+21
-16
lines changed

app/assets/stylesheets/forms/_forms.sass

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ hr
5656
padding-right: 5px
5757

5858
// custom styles
59-
.form-container.login, .form-container.signup
59+
.form-container.login, .form-container.signup, .form-container.password
6060
max-width: 360px
6161
.btn
6262
margin-bottom: 30px
Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
.form-container
2-
= simple_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f|
3-
= f.error_notification
4-
.form-inputs
5-
= f.input :email, required: true, autofocus: true
6-
.center
7-
.form-actions
8-
= f.button :submit, "Send Reset Instructions"
9-
= render "devise/shared/links"
1+
= simple_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f|
2+
= f.error_notification
3+
.form-inputs
4+
= f.input :email, required: true, autofocus: true
5+
.form-actions.right
6+
= f.button :submit, "Send Reset Instructions"
7+
%p.session-link
8+
Remembered it?
9+
= link_to "Sign in!".html_safe, new_user_session_path
10+
%p.session-link
11+
No account?
12+
= link_to "Register!".html_safe, new_user_registration_path
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
- title 'Change Password'
2-
.form-container
3-
.section-title
2+
.form-container.password
3+
.section-title.center
44
Change Your
55
%span.emphasized Password
66
= simple_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f|
@@ -10,6 +10,8 @@
1010
.form-inputs
1111
= f.input :password, label: "New Password", required: true, autofocus: true
1212
= f.input :password_confirmation, label: "Confirm", required: true
13-
.form-actions
13+
.form-actions.right
1414
= f.button :submit, "Change My Password"
15-
= render "devise/shared/links"
15+
%p.session-link
16+
Remembered it?
17+
= link_to "Sign in!".html_safe, new_user_session_path

app/views/devise/passwords/new.html.haml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
- title 'Password Reset'
2-
.form-container
3-
%h1.section-title
2+
.form-container.password
3+
%h1.section-title.center
44
Reset Your
55
%span.emphasized Password
66

0 commit comments

Comments
 (0)