You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
1.5 KiB

  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? and 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'