about summary refs log tree commit diff
path: root/app/views/auth/passwords/edit.html.erb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-03-05 22:43:05 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-03-05 22:43:05 +0100
commit6045b6cb1880b27e8b21799b9501a794a5f5b88b (patch)
tree415169b028c44d15da6a4ddaf152175ff8f1fcc0 /app/views/auth/passwords/edit.html.erb
parent7e93da3f8d31041034ba4eece5ee7a2cec5cfd2b (diff)
Customizing devise views and controllers
Diffstat (limited to 'app/views/auth/passwords/edit.html.erb')
-rw-r--r--app/views/auth/passwords/edit.html.erb25
1 files changed, 25 insertions, 0 deletions
diff --git a/app/views/auth/passwords/edit.html.erb b/app/views/auth/passwords/edit.html.erb
new file mode 100644
index 000000000..6a796b050
--- /dev/null
+++ b/app/views/auth/passwords/edit.html.erb
@@ -0,0 +1,25 @@
+<h2>Change your password</h2>
+
+<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %>
+  <%= devise_error_messages! %>
+  <%= f.hidden_field :reset_password_token %>
+
+  <div class="field">
+    <%= f.label :password, "New password" %><br />
+    <% if @minimum_password_length %>
+      <em>(<%= @minimum_password_length %> characters minimum)</em><br />
+    <% end %>
+    <%= f.password_field :password, autofocus: true, autocomplete: "off" %>
+  </div>
+
+  <div class="field">
+    <%= f.label :password_confirmation, "Confirm new password" %><br />
+    <%= f.password_field :password_confirmation, autocomplete: "off" %>
+  </div>
+
+  <div class="actions">
+    <%= f.submit "Change my password" %>
+  </div>
+<% end %>
+
+<%= render "devise/shared/links" %>