_login.html.haml 1.2 KB

12345678910111213141516171819202122
  1. - unless omniauth_only?
  2. = simple_form_for(new_user, url: user_session_path, namespace: 'login') do |f|
  3. .fields-group
  4. - if use_seamless_external_login?
  5. = f.input :email, placeholder: t('simple_form.labels.defaults.username_or_email'), input_html: { 'aria-label' => t('simple_form.labels.defaults.username_or_email') }, hint: false
  6. - else
  7. = f.input :email, placeholder: t('simple_form.labels.defaults.email'), input_html: { 'aria-label' => t('simple_form.labels.defaults.email') }, hint: false
  8. = f.input :password, placeholder: t('simple_form.labels.defaults.password'), input_html: { 'aria-label' => t('simple_form.labels.defaults.password') }, hint: false
  9. .actions
  10. = f.button :button, t('auth.login'), type: :submit, class: 'button button-primary'
  11. %p.hint.subtle-hint= link_to t('auth.trouble_logging_in'), new_user_password_path
  12. - if Devise.mappings[:user].omniauthable? and User.omniauth_providers.any?
  13. .simple_form.alternative-login
  14. %h4= omniauth_only? ? t('auth.log_in_with') : t('auth.or_log_in_with')
  15. .actions
  16. - User.omniauth_providers.each do |provider|
  17. = provider_sign_in_link(provider)