= form_for(resource, as: resource_name,
    url: registration_path(resource_name) + '#email',
    html: { method: :put, class: 'form-horizontal' }) do |f|
  %br/
  = render 'devise/shared/error_messages', resource: resource

  .form-group
    = f.label :email, class: 'control-label col-md-2'
    .col-md-8
      = f.email_field :email, class: 'form-control'
      %span.help-block If you change your email address you will have to reconfirm.

  .form-group
    .col-md-offset-2.col-md-8.checkbox
      %label
        = f.check_box :show_email
        Show email publicly on your profile page.

  .form-group
    .col-md-offset-2.col-md-8.checkbox
      %label
        = f.check_box :send_notification_email
        Receive emailed copies of Inbox notifications (eg. private messages).

  .form-group
    .col-md-offset-2.col-md-8.checkbox
      %label
        = f.check_box :send_planting_reminder
        Receive regular reminders to track your planting and harvesting.

  .form-group
    .col-md-offset-2.col-md-8.checkbox
      %label
        = f.check_box :newsletter
        Subscribe to the #{ENV['GROWSTUFF_SITE_NAME']} newsletter
      .help-block
        = render partial: 'newsletter_blurb'

  .form-group
    .form-actions.col-md-offset-2.col-md-8
      = f.submit "Save", class: 'btn btn-primary'
      = f.hidden_field(:tos_agreement, value: true)
