<% content_for :title, "Change your personal details" %>

<% content_for :before_content do %>
  <%= govuk_back_link(
    text: 'Back',
    href: :back,
  ) %>
<% end %>

<%= form_for(current_user, as: :user, html: { method: :patch }) do |f| %>
  <div class="govuk-grid-row">
    <div class="govuk-grid-column-two-thirds">
      <%= f.govuk_error_summary %>

      <h1 class="govuk-heading-l">
        <%= content_for(:title) %>
      </h1>

      <%= f.govuk_text_field :name,
        autocomplete: "name"
      %>

      <%= f.govuk_email_field :email,
        label: { text: "Email address" },
        autocomplete: "email"
      %>

      <%= f.govuk_submit "Save changes" %>
    </div>
  </div>
<% end %>