new.html.haml 1.3 KB

12345678910111213141516171819202122232425262728
  1. - content_for :page_title do
  2. = t('auth.login')
  3. - content_for :header_tags do
  4. = render partial: 'shared/og'
  5. - unless omniauth_only?
  6. = simple_form_for(resource, as: resource_name, url: session_path(resource_name)) do |f|
  7. .fields-group
  8. - if use_seamless_external_login?
  9. = f.input :email, autofocus: true, wrapper: :with_label, label: t('simple_form.labels.defaults.username_or_email'), input_html: { 'aria-label' => t('simple_form.labels.defaults.username_or_email') }, hint: false
  10. - else
  11. = f.input :email, autofocus: true, wrapper: :with_label, label: t('simple_form.labels.defaults.email'), input_html: { 'aria-label' => t('simple_form.labels.defaults.email') }, hint: false
  12. .fields-group
  13. = f.input :password, wrapper: :with_label, label: t('simple_form.labels.defaults.password'), input_html: { 'aria-label' => t('simple_form.labels.defaults.password'), :autocomplete => 'current-password' }, hint: false
  14. .actions
  15. = f.button :button, t('auth.login'), type: :submit
  16. - if devise_mapping.omniauthable? and resource_class.omniauth_providers.any?
  17. .simple_form.alternative-login
  18. %h4= omniauth_only? ? t('auth.log_in_with') : t('auth.or_log_in_with')
  19. .actions
  20. - resource_class.omniauth_providers.each do |provider|
  21. = provider_sign_in_link(provider)
  22. .form-footer= render 'auth/shared/links'