NEW: user accounts (#3)
This commit is contained in:
parent
d02c491028
commit
9990771c18
31 changed files with 1640 additions and 207 deletions
25
lib/planner_web/templates/user_reset_password/edit.html.eex
Normal file
25
lib/planner_web/templates/user_reset_password/edit.html.eex
Normal file
|
@ -0,0 +1,25 @@
|
|||
<h1>Reset password</h1>
|
||||
|
||||
<%= form_for @changeset, Routes.user_reset_password_path(@conn, :update, @token), fn f -> %>
|
||||
<%= if @changeset.action do %>
|
||||
<div class="alert alert-danger">
|
||||
<p>Oops, something went wrong! Please check the errors below.</p>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= label f, :password, "New password" %>
|
||||
<%= password_input f, :password, required: true %>
|
||||
<%= error_tag f, :password %>
|
||||
|
||||
<%= label f, :password_confirmation, "Confirm new password" %>
|
||||
<%= password_input f, :password_confirmation, required: true %>
|
||||
<%= error_tag f, :password_confirmation %>
|
||||
|
||||
<div>
|
||||
<%= submit "Reset password" %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<p>
|
||||
<%= link "Login", to: Routes.user_session_path(@conn, :new) %>
|
||||
</p>
|
14
lib/planner_web/templates/user_reset_password/new.html.eex
Normal file
14
lib/planner_web/templates/user_reset_password/new.html.eex
Normal file
|
@ -0,0 +1,14 @@
|
|||
<h1>Forgot your password?</h1>
|
||||
|
||||
<%= form_for :user, Routes.user_reset_password_path(@conn, :create), fn f -> %>
|
||||
<%= label f, :email %>
|
||||
<%= text_input f, :email, required: true %>
|
||||
|
||||
<div>
|
||||
<%= submit "Send instructions to reset password" %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<p>
|
||||
<%= link "Login", to: Routes.user_session_path(@conn, :new) %>
|
||||
</p>
|
Loading…
Add table
Add a link
Reference in a new issue