summaryrefslogtreecommitdiff
path: root/app/views/devise
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-07-02 16:33:38 +0200
committerDouwe Maan <douwe@gitlab.com>2015-07-23 15:20:12 +0200
commit70a3c165a9f3882a82cf8946a783ace091635797 (patch)
tree2d09f34639859b2eadf5b648ac42f55b2419ceb2 /app/views/devise
parent5dd4dea93baa6386ed860a50125dce3ca3890f16 (diff)
downloadgitlab-ce-70a3c165a9f3882a82cf8946a783ace091635797.tar.gz
Allow custom label to be set for authentication providers.auth-icons-labels
Diffstat (limited to 'app/views/devise')
-rw-r--r--app/views/devise/sessions/_new_ldap.html.haml2
-rw-r--r--app/views/devise/shared/_omniauth_box.html.haml8
-rw-r--r--app/views/devise/shared/_signin_box.html.haml2
3 files changed, 5 insertions, 7 deletions
diff --git a/app/views/devise/sessions/_new_ldap.html.haml b/app/views/devise/sessions/_new_ldap.html.haml
index 6ec741e4882..689cd6ed665 100644
--- a/app/views/devise/sessions/_new_ldap.html.haml
+++ b/app/views/devise/sessions/_new_ldap.html.haml
@@ -6,4 +6,4 @@
%label{for: "remember_me"}
= check_box_tag :remember_me, '1', false, id: 'remember_me'
%span Remember me
- = button_tag "#{server['label']} Sign in", class: "btn-save btn"
+ = button_tag "Sign in", class: "btn-save btn"
diff --git a/app/views/devise/shared/_omniauth_box.html.haml b/app/views/devise/shared/_omniauth_box.html.haml
index f8ba9d80ae8..ecf680e7b23 100644
--- a/app/views/devise/shared/_omniauth_box.html.haml
+++ b/app/views/devise/shared/_omniauth_box.html.haml
@@ -1,10 +1,8 @@
%p
%span.light
Sign in with &nbsp;
- - providers = additional_providers
+ - providers = button_based_providers
- providers.each do |provider|
%span.light
- - if default_providers.include?(provider)
- = link_to oauth_image_tag(provider), omniauth_authorize_path(resource_name, provider), method: :post, class: 'oauth-image-link'
- - else
- = link_to provider.to_s.titleize, omniauth_authorize_path(resource_name, provider), method: :post, class: "btn", "data-no-turbolink" => "true"
+ - has_icon = provider_has_icon?(provider)
+ = link_to provider_image_tag(provider), user_omniauth_authorize_path(provider), method: :post, class: (has_icon ? 'oauth-image-link' : 'btn'), "data-no-turbolink" => "true"
diff --git a/app/views/devise/shared/_signin_box.html.haml b/app/views/devise/shared/_signin_box.html.haml
index c76574db457..bb5e479697d 100644
--- a/app/views/devise/shared/_signin_box.html.haml
+++ b/app/views/devise/shared/_signin_box.html.haml
@@ -6,7 +6,7 @@
.login-heading
%h3 Sign in
.login-body
- - if ldap_enabled?
+ - if form_based_providers.any?
%ul.nav.nav-tabs
- @ldap_servers.each_with_index do |server, i|
%li{class: (:active if i.zero?)}