Change email
<%= form_for @changeset, "#", [phx_change: :validate, phx_submit: :save, phx_target: @myself], fn f -> %>
<%= label f, :email, class: "form-label" %>
<%= icon_div @socket, "bi-at", [class: "icon fs-5"] %>
<%= email_input f, :email,
value: input_value(f, :email),
class: input_class(f, :email, "form-control"),
placeholder: "e.g., babka@73k.us",
maxlength: User.max_email,
phx_debounce: "600",
aria_describedby: error_id(f, :email)
%>
<%= error_tag f, :email %>
<%= label f, :current_password, class: "form-label" %>
<%= icon_div @socket, "bi-lock", [class: "icon fs-5"] %>
<%= password_input f, :current_password,
class: "form-control",
required: true,
aria_describedby: error_id(f, :current_password)
%>
<%= error_tag f, :current_password %>
<%= submit "Change email",
disabled: !@changeset.valid? || input_value(f, :current_password) == "",
class: "btn btn-primary",
phx_disable_with: "Saving..."
%>
<% end %>