<%= render 'users/tabs', user: current_user %>

<h1>Edit Account Settings</h1>

<%= link_to two_factor_status_path, class: 'button is-outlined' do %>
  Two-factor authentication &raquo;
<% end %>

<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
  <%= render "devise/shared/error_messages", resource: resource %>

  <div class="form-group">
    <%= f.label :email, class: "form-element" %>
    <%= f.email_field :email, class: 'form-element', autofocus: true, autocomplete: "email" %>
  </div>

  <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
    <div class="notice">Currently waiting confirmation for: <%= resource.unconfirmed_email %></div>
  <% end %>

  <div class="form-group">
    <%= f.label :username, class: "form-element" %>
    <%= f.text_field :username, class: 'form-element', autocomplete: 'off' %>
  </div>

  <div class="form-group">
    <%= f.label :password, class: "form-element" %>
    <div class="form-caption">
      Leave blank if you don't want to change it.
      <% if @minimum_password_length %>
        <em>(<%= @minimum_password_length %> characters minimum)</em>
      <% end %>
    </div>
    <%= f.password_field :password, class: 'form-element', autocomplete: "new-password" %>
    
  </div>

  <div class="form-group">
    <%= f.label :password_confirmation, class: "form-element" %>
    <%= f.password_field :password_confirmation, class: 'form-element', autocomplete: "new-password" %>
  </div>

  <div class="form-group">
    <%= f.label :current_password, class: "form-element" %>
    <div class="form-caption">We need your current password to confirm your changes.</div>
    <%= f.password_field :current_password, class: 'form-element', autocomplete: "current-password" %>
  </div>

  <%= f.submit "Update", class: 'button is-filled is-very-large' %>
<% end %><br/>
