Reset password

Hi <%= @user.email %> — tell us your new password, please.

<%= form_for @changeset, "#", [phx_change: :validate, phx_submit: :save, novalidate: true, id: "pw_reset_form"], fn f -> %> <%= label f, :password, "New password", class: "form-label" %>
<%= password_input f, :password, value: input_value(f, :password), class: input_class(f, :password, "form-control"), maxlength: User.max_password, autofocus: true, aria_describedby: error_ids(f, :password) %> <%= error_tag f, :password %>
<%= label f, :password_confirmation, "Confirm new password", class: "form-label" %>
<%= password_input f, :password_confirmation, value: input_value(f, :password_confirmation), class: input_class(f, :password_confirmation, "form-control"), maxlength: User.max_password, aria_describedby: error_ids(f, :password_confirmation) %> <%= error_tag f, :password_confirmation %>
<%= submit "Reset password", class: "btn btn-primary", disabled: !@changeset.valid?, aria_disabled: !@changeset.valid? && "true" || false, phx_disable_with: "Saving..." %>
<% end %>

<%= if allow_registration() do %> <%= link "Register", to: Routes.user_registration_path(@socket, :new) %> | <% end %> <%= link "Log in", to: Routes.user_session_path(@socket, :new) %>