diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-07-02 17:33:38 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-07-23 16:20:12 +0300 |
commit | 70a3c165a9f3882a82cf8946a783ace091635797 (patch) | |
tree | 2d09f34639859b2eadf5b648ac42f55b2419ceb2 /app/views/devise | |
parent | 5dd4dea93baa6386ed860a50125dce3ca3890f16 (diff) |
Allow custom label to be set for authentication providers.
Diffstat (limited to 'app/views/devise')
-rw-r--r-- | app/views/devise/sessions/_new_ldap.html.haml | 2 | ||||
-rw-r--r-- | app/views/devise/shared/_omniauth_box.html.haml | 8 | ||||
-rw-r--r-- | app/views/devise/shared/_signin_box.html.haml | 2 |
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 - - 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?)} |