diff options
Diffstat (limited to 'app/views/users')
-rw-r--r-- | app/views/users/passwords/edit.html.haml | 16 | ||||
-rw-r--r-- | app/views/users/passwords/new.html.haml | 11 |
2 files changed, 27 insertions, 0 deletions
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 @@ | |||
1 | %h2 Change your password | ||
2 | = devise_error_messages! | ||
3 | #principal | ||
4 | = form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| | ||
5 | = f.hidden_field :reset_password_token | ||
6 | .field | ||
7 | = f.label :password, "New password" | ||
8 | - if @minimum_password_length | ||
9 | %em= "(#{@minimum_password_length} characters minimum)" | ||
10 | = f.password_field :password, autofocus: true, autocomplete: "off" | ||
11 | .field | ||
12 | = f.label :password_confirmation, "Confirm new password" | ||
13 | = f.password_field :password_confirmation, autocomplete: "off" | ||
14 | .submit-field | ||
15 | = f.submit "Change my password" | ||
16 | .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 @@ | |||
1 | %h2 Forgot your password? | ||
2 | = devise_error_messages! | ||
3 | #principal | ||
4 | = form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| | ||
5 | .field | ||
6 | = f.label :email | ||
7 | = f.email_field :email, autofocus: true | ||
8 | .submit-field | ||
9 | = f.submit "Submit" | ||
10 | .navigation= link_to "Log in", new_session_path(resource_name) | ||
11 | .navigation= link_to "← Back to thoughts", root_url | ||