new.html.haml 1.4 KB

12345678910111213141516171819202122232425262728
  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. .fields-group
  7. - if use_seamless_external_login?
  8. = 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
  9. - else
  10. = 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
  11. .fields-group
  12. = f.input :password, wrapper: :with_label, label: t('simple_form.labels.defaults.password'), input_html: { 'aria-label' => t('simple_form.labels.defaults.password'), :autocomplete => 'off' }, hint: false
  13. .actions
  14. = f.button :button, t('auth.login'), type: :submit
  15. - if devise_mapping.omniauthable? and resource_class.omniauth_providers.any?
  16. .simple_form.alternative-login
  17. %h4= t('auth.or_log_in_with')
  18. .actions
  19. - resource_class.omniauth_providers.each do |provider|
  20. = link_to omniauth_authorize_path(resource_name, provider), class: "button button-#{provider}" do
  21. = t("auth.providers.#{provider}", default: provider.to_s.chomp("_oauth2").capitalize)
  22. .form-footer= render 'auth/shared/links'