Settings

Change email

<%= form_for @email_changeset, Routes.user_settings_path(@conn, :update), [class: "flex flex-col justify-center items-center space-y-4"], fn f -> %> <%= 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, class: "title text-lg text-primary-500" %> <%= email_input f, :email, required: true, class: "input input-primary col-span-2" %>
<%= error_tag f, :email %>
<%= label f, :current_password, for: "current_password_for_email", class: "title text-lg text-primary-500" %> <%= password_input f, :current_password, required: true, name: "current_password", id: "current_password_for_email", class: "input input-primary col-span-2" %>
<%= error_tag f, :current_password %> <%= submit "Change email", class: "btn btn-primary" %> <% end %>

Change password

<%= form_for @password_changeset, Routes.user_settings_path(@conn, :update), [class: "flex flex-col justify-center items-center space-y-4"], fn f -> %> <%= 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", class: "title text-lg text-primary-500" %> <%= password_input f, :password, required: true, class: "input input-primary col-span-2" %>
<%= error_tag f, :password %>
<%= label f, :password_confirmation, "Confirm new password", class: "title text-lg text-primary-500" %> <%= password_input f, :password_confirmation, required: true, class: "input input-primary col-span-2" %>
<%= error_tag f, :password_confirmation %>
<%= label f, :current_password, for: "current_password_for_password", class: "title text-lg text-primary-500" %> <%= password_input f, :current_password, required: true, name: "current_password", id: "current_password_for_password", class: "input input-primary col-span-2" %>
<%= error_tag f, :current_password %> <%= submit "Change password", class: "btn btn-primary" %> <% end %>