diff options
author | Logan Hunt <loganhunt@simponic.xyz> | 2022-04-06 12:13:54 -0600 |
---|---|---|
committer | Logan Hunt <loganhunt@simponic.xyz> | 2022-04-06 12:13:54 -0600 |
commit | 2055742911201258e6f755b3eb4031a1b09407f1 (patch) | |
tree | a8e0471cab55329e2e00b5d3e2011d37bb67fdb6 /lib/aggiedit_web/templates/user_reset_password | |
download | aggiedit-2055742911201258e6f755b3eb4031a1b09407f1.tar.gz aggiedit-2055742911201258e6f755b3eb4031a1b09407f1.zip |
Initial commit; generate auth code with phx.gen.auth; added room model and association; generate room model on domain of user emails; allow users to change their email
Diffstat (limited to 'lib/aggiedit_web/templates/user_reset_password')
-rw-r--r-- | lib/aggiedit_web/templates/user_reset_password/edit.html.heex | 26 | ||||
-rw-r--r-- | lib/aggiedit_web/templates/user_reset_password/new.html.heex | 15 |
2 files changed, 41 insertions, 0 deletions
diff --git a/lib/aggiedit_web/templates/user_reset_password/edit.html.heex b/lib/aggiedit_web/templates/user_reset_password/edit.html.heex new file mode 100644 index 0000000..d8efb4b --- /dev/null +++ b/lib/aggiedit_web/templates/user_reset_password/edit.html.heex @@ -0,0 +1,26 @@ +<h1>Reset password</h1> + +<.form let={f} for={@changeset} action={Routes.user_reset_password_path(@conn, :update, @token)}> + <%= 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> +</.form> + +<p> + <%= link "Register", to: Routes.user_registration_path(@conn, :new) %> | + <%= link "Log in", to: Routes.user_session_path(@conn, :new) %> +</p> diff --git a/lib/aggiedit_web/templates/user_reset_password/new.html.heex b/lib/aggiedit_web/templates/user_reset_password/new.html.heex new file mode 100644 index 0000000..126cdba --- /dev/null +++ b/lib/aggiedit_web/templates/user_reset_password/new.html.heex @@ -0,0 +1,15 @@ +<h1>Forgot your password?</h1> + +<.form let={f} for={:user} action={Routes.user_reset_password_path(@conn, :create)}> + <%= label f, :email %> + <%= email_input f, :email, required: true %> + + <div> + <%= submit "Send instructions to reset password" %> + </div> +</.form> + +<p> + <%= link "Register", to: Routes.user_registration_path(@conn, :new) %> | + <%= link "Log in", to: Routes.user_session_path(@conn, :new) %> +</p> |