summaryrefslogtreecommitdiff
path: root/app/views/devise
diff options
context:
space:
mode:
authorPatricio Cano <patricio@gitlab.com>2014-10-22 12:44:23 -0500
committerPatricio Cano <patricio@gitlab.com>2014-10-22 12:44:23 -0500
commit10528341c296fafca8388159d7b0023cd2ffb1cb (patch)
treeeae98fd301fef40f2f7aa42fa4dd75a98b3e3cc3 /app/views/devise
parent91c96b3714a8f5753d9851ee8e2a859b201f6905 (diff)
parentc6efa56ee7039882625942ce29ea9fdeeffaa6cd (diff)
downloadgitlab-ce-10528341c296fafca8388159d7b0023cd2ffb1cb.tar.gz
Merge branch 'master' into feature_password_strength_indicator
Diffstat (limited to 'app/views/devise')
-rw-r--r--app/views/devise/sessions/_new_ldap.html.haml2
-rw-r--r--app/views/devise/sessions/new.html.haml27
2 files changed, 15 insertions, 14 deletions
diff --git a/app/views/devise/sessions/_new_ldap.html.haml b/app/views/devise/sessions/_new_ldap.html.haml
index 6c5a878e904..01584611493 100644
--- a/app/views/devise/sessions/_new_ldap.html.haml
+++ b/app/views/devise/sessions/_new_ldap.html.haml
@@ -1,4 +1,4 @@
-= form_tag(user_omniauth_callback_path(:ldap), id: 'new_ldap_user' ) do
+= form_tag(user_omniauth_callback_path(provider), id: 'new_ldap_user' ) do
= text_field_tag :username, nil, {class: "form-control top", placeholder: "LDAP Login", autofocus: "autofocus"}
= password_field_tag :password, nil, {class: "form-control bottom", placeholder: "Password"}
%br/
diff --git a/app/views/devise/sessions/new.html.haml b/app/views/devise/sessions/new.html.haml
index b70b0d66172..ca7e9570b43 100644
--- a/app/views/devise/sessions/new.html.haml
+++ b/app/views/devise/sessions/new.html.haml
@@ -2,22 +2,24 @@
.login-heading
%h3 Sign in
.login-body
- - if ldap_enabled? && gitlab_config.signin_enabled
+ - if ldap_enabled?
%ul.nav.nav-tabs
- %li.active
- = link_to 'LDAP', '#tab-ldap', 'data-toggle' => 'tab'
- %li
- = link_to 'Standard', '#tab-signin', 'data-toggle' => 'tab'
+ - @ldap_servers.each_with_index do |server, i|
+ %li{class: (:active if i.zero?)}
+ = link_to server['label'], "#tab-#{server['provider_name']}", 'data-toggle' => 'tab'
+ - if gitlab_config.signin_enabled
+ %li
+ = link_to 'Standard', '#tab-signin', 'data-toggle' => 'tab'
.tab-content
- %div#tab-ldap.tab-pane.active
- = render partial: 'devise/sessions/new_ldap'
- %div#tab-signin.tab-pane
- = render partial: 'devise/sessions/new_base'
+ - @ldap_servers.each_with_index do |server, i|
+ %div.tab-pane{id: "tab-#{server['provider_name']}", class: (:active if i.zero?)}
+ = render 'devise/sessions/new_ldap', provider: server['provider_name']
+ - if gitlab_config.signin_enabled
+ %div#tab-signin.tab-pane
+ = render 'devise/sessions/new_base'
- - elsif ldap_enabled?
- = render partial: 'devise/sessions/new_ldap'
- elsif gitlab_config.signin_enabled
- = render partial: 'devise/sessions/new_base'
+ = render 'devise/sessions/new_base'
- else
%div
No authentication methods configured.
@@ -36,7 +38,6 @@
%span.light Did not receive confirmation email?
= link_to "Send again", new_confirmation_path(resource_name)
-
- if extra_config.has_key?('sign_in_text')
%hr
= markdown(extra_config.sign_in_text)