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.

26 lines
1.3 KiB

  1. - content_for :page_title do
  2. = t('auth.login')
  3. - content_for :header_tags do
  4. = render partial: 'shared/og'
  5. = simple_form_for(resource, as: resource_name, url: session_path(resource_name)) do |f|
  6. - if use_seamless_external_login?
  7. = f.input :email, autofocus: true, placeholder: t('simple_form.labels.defaults.username_or_email'), required: true, input_html: { 'aria-label' => t('simple_form.labels.defaults.username_or_email') }
  8. - else
  9. = f.input :email, autofocus: true, placeholder: t('simple_form.labels.defaults.email'), required: true, input_html: { 'aria-label' => t('simple_form.labels.defaults.email') }
  10. = f.input :password, placeholder: t('simple_form.labels.defaults.password'), required: true, input_html: { 'aria-label' => t('simple_form.labels.defaults.password'), :autocomplete => 'off' }
  11. .actions
  12. = f.button :button, t('auth.login'), type: :submit
  13. - if devise_mapping.omniauthable? and resource_class.omniauth_providers.any?
  14. .simple_form.alternative-login
  15. %h4= t('auth.or_log_in_with')
  16. .actions
  17. - resource_class.omniauth_providers.each do |provider|
  18. = link_to omniauth_authorize_path(resource_name, provider), class: "button button-#{provider}" do
  19. = t("auth.providers.#{provider}", default: provider.to_s.chomp("_oauth2").capitalize)
  20. .form-footer= render 'auth/shared/links'