<%= form_for @email_changeset, Routes.user_settings_path(@conn, :update), [class: "flex flex-col h-full justify-center items-start m-auto"], fn f -> %>
Change email
<%= if @email_changeset.action do %>
Oops, something went wrong! Please check the errors below.
<% end %>
<%= hidden_input f, :action, name: "action", value: "update_email" %>
<%= label f, :email %>
<%= email_input f, :email, [class: "text-black px-2 py-1 outline-none", required: true] %>
<%= error_tag f, :email %>
<%= label f, :current_password, for: "current_password_for_email" %>
<%= password_input f, :current_password, [class: "text-black px-2 py-1 outline-none", required: true, name: "current_password", id: "current_password_for_email"]%>
<%= error_tag f, :current_password %>
<%= submit "Change email" %>
<% end %>
<%= form_for @password_changeset, Routes.user_settings_path(@conn, :update), [class: "flex flex-col h-full justify-center items-start m-auto"], fn f -> %>
Change password
<%= if @password_changeset.action do %>
Oops, something went wrong! Please check the errors below.
<% end %>
<%= hidden_input f, :action, name: "action", value: "update_password" %>
<%= label f, :password, "New password" %>
<%= password_input f, :password, [class: "text-black px-2 py-1 outline-none", required: true] %>
<%= error_tag f, :password %>
<%= 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 %>
<%= label f, :current_password, for: "current_password_for_password" %>
<%= password_input f, :current_password, [class: "text-black px-2 py-1 outline-none", required: true, name: "current_password", id: "current_password_for_password"] %>
<%= error_tag f, :current_password %>
<%= submit "Change password" %>
<% end %>