<h2>Edit Profile</h2>

<%= form_for(resource, as: resource_name, url: user_registration_path(resource_name), html: { method: :put }) do |f| %>
  <%= devise_error_messages! %>

  <div class="field">
    <%= f.label :first_name %>
    <%= f.text_field :first_name, autofocus: true %>
  </div>

  <div class="field">
    <%= f.label :last_name %>
    <%= f.text_field :last_name, autofocus: true %>
  </div>

  <div class="field">
    <%= f.label :email %>
    <%= f.email_field :email, autofocus: true %>
  </div>

  <div class="field">
    <%= f.label :phone %>
    <%= f.text_field :phone, autofocus: true %>
  </div>

  <div class="field">
    <%= f.label :photo %>
    <%= f.file_field :photo %>
  </div>

<% end %>

<h3>Cancel my account</h3>

<p>Unhappy? <%= button_to "Cancel my account", user_registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete %></p>

<%= link_to "Back", :back %>

<h2>Edit Profile</h2>

<%= form_for(resource, as: resource_name, url: user_registration_path(resource_name), html: { method: :put }) do |f| %>
  <%= devise_error_messages! %>

  <div class="field">
    <%= f.label :first_name %>
    <%= f.text_field :first_name, autofocus: true %>
  </div>

  <div class="field">
    <%= f.label :last_name %>
    <%= f.text_field :last_name, autofocus: true %>
  </div>

  <div class="field">
    <%= f.label :email %>
    <%= f.email_field :email, autofocus: true %>
  </div>

  <div class="field">
    <%= f.label :phone %>
    <%= f.text_field :phone, autofocus: true %>
  </div>

  <div class="field">
    <%= f.label :photo %>
    <%= f.file_field :photo %>
  </div>

  <div class="actions">
    <%= f.submit "Update" %>
  </div>

<% end %>


<h3>Cancel my account</h3>

<p>Unhappy? <%= button_to "Cancel my account", user_registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete %></p>

<%= link_to "Back", :back %>

Add back the update button
Add back the update button
