Change email
<%= form_for @changeset, "#", [phx_change: :validate, phx_submit: :save, phx_target: @myself], fn f -> %>
<%= label f, :email, class: "form-label" %>
<%= 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: "500",
aria_describedby: error_ids(f, :email)
%>
<%= error_tag f, :email %>
<%= label f, :current_password, class: "form-label" %>
<%= password_input f, :current_password,
value: input_value(f, :current_password),
id: "user_email_current_password",
class: "form-control"
%>
<%= submit "Change email",
class: "btn btn-primary",
disabled: !@changeset.valid? || input_value(f, :current_password) == "",
aria_disabled: (!@changeset.valid? || input_value(f, :current_password) == "") && "true" || false,
phx_disable_with: "Saving..."
%>
<% end %>