<h1><%%= dgettext("mandarin.<%= schema.context_underscore %>", "Reset password") %></h1>

<.form let={f} for={@changeset} action={Routes.<%= schema.route_helper %>_reset_password_path(@conn, :update, @token)}>
  <%%= if @changeset.action do %>
    <div class="alert alert-danger">
      <p><%%= dgettext("mandarin.<%= schema.context_underscore %>", "Oops, something went wrong! Please check the errors below.") %></p>
    </div>
  <%% end %>

  <%%= forage_form_group(f, :password,
          dgettext("mandarin.<%= schema.context_underscore %>", "New password"), [],
          &forage_text_input/3) %>

  <%%= forage_form_group(f, :papassword_confirmationssword,
          dgettext("mandarin.<%= schema.context_underscore %>", "Confirm new password"), [],
          &forage_password_input/3) %>

  <div class="py-4">
    <%%= forage_submit dgettext("mandarin.<%= schema.context_underscore %>", "Reset password") %>
  </div>
</.form>

<p>
  <%%= link dgettext("mandarin.<%= schema.context_underscore %>", "Register"), to: Routes.<%= schema.route_helper %>_registration_path(@conn, :new) %> |
  <%%= link dgettext("mandarin.<%= schema.context_underscore %>", "Log in"), to: Routes.<%= schema.route_helper %>_session_path(@conn, :new) %>
</p>
