Commit ffbde687 authored by kaiyou's avatar kaiyou

Simplify the force_oauth related views

parent 9483df9c
Pipeline #966 passed with stage
in 4 minutes and 39 seconds
= simple_form_for(new_user, url: user_session_path, namespace: 'login') do |f|
.fields-group
- if use_seamless_external_login?
= 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
- else
= f.input :email, placeholder: t('simple_form.labels.defaults.email'), input_html: { 'aria-label' => t('simple_form.labels.defaults.email') }, hint: false
- if !Setting.force_oauth
.fields-group
- if use_seamless_external_login?
= 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
- else
= f.input :email, placeholder: t('simple_form.labels.defaults.email'), input_html: { 'aria-label' => t('simple_form.labels.defaults.email') }, hint: false
= f.input :password, placeholder: t('simple_form.labels.defaults.password'), input_html: { 'aria-label' => t('simple_form.labels.defaults.password') }, hint: false
= f.input :password, placeholder: t('simple_form.labels.defaults.password'), input_html: { 'aria-label' => t('simple_form.labels.defaults.password') }, hint: false
- if Setting.force_oauth
.actions
= f.button :button, t('auth.login_sso'), type: :submit, class: 'button button-primary'
- else
.actions
= f.button :button, t('auth.login'), type: :submit, class: 'button button-primary'
.actions
= f.button :button, t('auth.login'), type: :submit, class: 'button button-primary'
%p.hint.subtle-hint= link_to t('auth.trouble_logging_in'), new_user_password_path
......@@ -13,7 +13,11 @@
.landing__grid
.landing__grid__column.landing__grid__column-registration
- if !Setting.force_oauth
- if Setting.force_oauth
.box-widget
.actions
= link_to t('auth.login_sso'), user_session_path
- else
.box-widget
= render 'registration'
......@@ -46,8 +50,9 @@
%small= t('about.apps_platforms')
.landing__grid__column.landing__grid__column-login
.box-widget
= render 'login'
- if !Setting.force_oauth
.box-widget
= render 'login'
.hero-widget
.hero-widget__img
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment