katbin/lib/ketbin_web/templates/user_reset_password/edit.html.heex

33 lines
1.2 KiB
Plaintext
Raw Normal View History

<div class="flex flex-col w-full h-full justify-center items-center">
<h1 class="font-bold text-4xl text-amber pt-4">Reset password</h1>
<%= form_for @changeset, Routes.user_reset_password_path(@conn, :update, @token), [class: "flex flex-col h-full justify-center items-start m-auto"], fn f -> %>
<%= if @changeset.action do %>
<div class="alert alert-danger">
<p>Oops, something went wrong! Please check the errors below.</p>
</div>
<% end %>
<div class="flex flex-col w-full">
<%= label f, :password, "New password" %>
<%= password_input f, :password, [class: "text-black px-2 py-1 outline-none", required: true] %>
<%= error_tag f, :password %>
</div>
<div class="flex flex-col w-full">
<%= label f, :password_confirmation, "Confirm new password" %>
<%= password_input f, :password_confirmation, [class: "text-black px-2 py-1 outline-none", required: true] %>
<%= error_tag f, :password_confirmation %>
</div>
<div class="bg-amber mt-4 rounded-sm px-2 py-1">
<%= submit "Reset password" %>
</div>
<% end %>
<p class="mb-4 text-amber">
<%= link "Register", to: Routes.user_registration_path(@conn, :new) %> |
<%= link "Log in", to: Routes.user_session_path(@conn, :new) %>
</p>
</div>