diff options
author | Aaron Stone <aaron@serendipity.cx> | 2014-08-11 11:06:15 -0700 |
---|---|---|
committer | Aaron Stone <aaron@serendipity.cx> | 2015-02-13 23:49:12 -0800 |
commit | 252ee4e7e51ae18f30f4b9089be850daaca958ac (patch) | |
tree | 56599d3fc9d0156b0efafe7222eed447db2c2676 /app/views/devise/shared | |
parent | d785b20c43b114bbae385a5446f9369370fbd3bf (diff) | |
download | gitlab-ce-252ee4e7e51ae18f30f4b9089be850daaca958ac.tar.gz |
Improve login screen when only OmniAuth providers are enabled
Avoids an empty Sign in box when signup_enabled? is false, and avoids
showing "No authentication methods configured" unless there really are none.
OmniAuth signin gets its own file for consistency with signin and signup and LDAP.
Diffstat (limited to 'app/views/devise/shared')
-rw-r--r-- | app/views/devise/shared/_omniauth_box.html.haml | 10 | ||||
-rw-r--r-- | app/views/devise/shared/_signin_box.html.haml | 16 |
2 files changed, 10 insertions, 16 deletions
diff --git a/app/views/devise/shared/_omniauth_box.html.haml b/app/views/devise/shared/_omniauth_box.html.haml new file mode 100644 index 00000000000..4cd1c303b22 --- /dev/null +++ b/app/views/devise/shared/_omniauth_box.html.haml @@ -0,0 +1,10 @@ +%p + %span.light + Sign in with + - providers = additional_providers + - providers.each do |provider| + %span.light + - if default_providers.include?(provider) + = link_to authbutton(provider, 32), omniauth_authorize_path(resource_name, provider) + - else + = link_to provider.to_s.titleize, omniauth_authorize_path(resource_name, provider), class: "btn" diff --git a/app/views/devise/shared/_signin_box.html.haml b/app/views/devise/shared/_signin_box.html.haml index 805cf816231..8faa6398a60 100644 --- a/app/views/devise/shared/_signin_box.html.haml +++ b/app/views/devise/shared/_signin_box.html.haml @@ -24,19 +24,3 @@ - elsif signin_enabled? = render 'devise/sessions/new_base' - - else - %div - No authentication methods configured. - -- if Gitlab.config.omniauth.enabled && devise_mapping.omniauthable? - .clearfix.prepend-top-20 - %p - %span.light - Sign in with - - providers = additional_providers - - providers.each do |provider| - %span.light - - if default_providers.include?(provider) - = link_to authbutton(provider, 32), omniauth_authorize_path(resource_name, provider) - - else - = link_to provider.to_s.titleize, omniauth_authorize_path(resource_name, provider), class: "btn"
\ No newline at end of file |