Edit Account

<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
Account confirmation pending for <%= resource.unconfirmed_email %>
<% end %> <%= simple_form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
<%= f.label :email, class: "label" %>

<%= f.input_field :email, required: true, autofocus: true, autocomplete: "email", class: "input" %>

<%= f.full_error :email, class: "help is-danger" %>
<%= link_to "Change password", "#", id: "registration-edit-password-button", class: "button is-fullwidth is-rounded" %>
<%= f.label :password, class: "label" %>

<%= f.input_field :password, required: false, autocomplete: "new-password", class: "input" %>

<%= f.hint "Leave blank to not change password", class: "help" %> <%= f.full_error :password, class: "help is-danger" %>
<%= f.label :password_confirmation, class: "label" %>

<%= f.input_field :password_confirmation, required: false, autocomplete: "new-password", class: "input" %>

<%= f.full_error :password_confirmation, class: "help is-danger" %>
<%= f.label :current_password, class: "label" %>

<%= f.input_field :current_password, required: true, autocomplete: "current-password", class: "input" %>

<%= f.hint "Password confirmation needed for changes", class: "help" %> <%= f.full_error :current_password, class: "help is-danger" %>

<%= f.button :submit, "Update Account", class: "button is-primary is-fullwidth is-rounded" %>

<% end %>
<%= link_to "Back", :back, class: "button is-primary is-fullwidth is-rounded is-light" %>
<%= link_to "Close my account", "#registration-edit-account-delete", id: "registration-edit-account-delete-button", class: "button is-danger is-fullwidth is-rounded is-light" %>
Warning! Account deletion is permanant and can not be recovered.
<%= link_to "Delete My Account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete, class: "button is-danger is-two-thirds is-rounded" %>