new.html.haml 1.5 KB

123456789101112131415161718192021222324252627282930
  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. %h1.title= t('auth.sign_in.title', domain: site_hostname)
  8. %p.lead= t('auth.sign_in.preamble_html', domain: site_hostname)
  9. .fields-group
  10. - if use_seamless_external_login?
  11. = 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
  12. - else
  13. = 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
  14. .fields-group
  15. = 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
  16. .actions
  17. = f.button :button, t('auth.login'), type: :submit
  18. - if devise_mapping.omniauthable? && resource_class.omniauth_providers.any?
  19. .simple_form.alternative-login
  20. %h4= omniauth_only? ? t('auth.log_in_with') : t('auth.or_log_in_with')
  21. .actions
  22. - resource_class.omniauth_providers.each do |provider|
  23. = provider_sign_in_link(provider)
  24. .form-footer= render 'auth/shared/links'