- form_method = resource.new_record? ? :post : :put
= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: form_method}) do |f|

  - handle_errors(resource)

  %fieldset.form-group
    = f.label(:first_name)
    = f.email_field(:first_name, autofocus: true, class: 'form-control')

  %fieldset.form-group
    = f.label(:last_name)
    = f.email_field(:last_name, autofocus: true, class: 'form-control')

  %fieldset.form-group
    = f.label(:email)
    = f.email_field(:email, class: 'form-control')

  %fieldset.form-group
    = f.label(:password, raw("Password <span>(#{@minimum_password_length} characters minimum)</span>"))
    = f.password_field(:password, autocomplete: "off", class: 'form-control')

  %fieldset.form-group
    = f.label(:password_confirmation)
    = f.password_field(:password_confirmation, autocomplete: "off", class: 'form-control')

  - if resource.persisted?
    %fieldset.form-group
      = f.label(:current_password, raw("Current password <span>(Needed to confirm changes)</span"))
      = f.password_field(:current_password, autocomplete: "off", class: 'form-control')

  .actions
    = f.submit((resource.new_record? ? 'Sign Up' : 'Update Settings'), class: 'btn btn-primary')
- form_method = resource.new_record? ? :post : :put
= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: form_method}) do |f|

  - handle_errors(resource)

  %fieldset.form-group
    = f.label(:first_name)
    = f.text_field(:first_name, autofocus: true, class: 'form-control')

  %fieldset.form-group
    = f.label(:last_name)
    = f.text_field(:last_name, class: 'form-control')

  %fieldset.form-group
    = f.label(:email)
    = f.email_field(:email, class: 'form-control')

  %fieldset.form-group
    = f.label(:password, raw("Password <span>(#{@minimum_password_length} characters minimum)</span>"))
    = f.password_field(:password, autocomplete: "off", class: 'form-control')

  %fieldset.form-group
    = f.label(:password_confirmation)
    = f.password_field(:password_confirmation, autocomplete: "off", class: 'form-control')

  - if resource.persisted?
    %fieldset.form-group
      = f.label(:current_password, raw("Current password <span>(Needed to confirm changes)</span"))
      = f.password_field(:current_password, autocomplete: "off", class: 'form-control')

  .actions
    = f.submit((resource.new_record? ? 'Sign Up' : 'Update Settings'), class: 'btn btn-primary')
Fix fields on registrations form
Fix fields on registrations form
