From 09791774a594972d410fa72f5e0a256f19f0915a Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Fri, 13 Mar 2015 15:42:31 +0100 Subject: Use custom LDAP label in LDAP signin form. --- app/views/devise/sessions/_new_ldap.html.haml | 6 +++--- app/views/devise/shared/_signin_box.html.haml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'app/views/devise') diff --git a/app/views/devise/sessions/_new_ldap.html.haml b/app/views/devise/sessions/_new_ldap.html.haml index e986989a728..812e22373a7 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(provider), id: 'new_ldap_user' ) do - = text_field_tag :username, nil, {class: "form-control top", placeholder: "LDAP Login", autofocus: "autofocus"} += form_tag(user_omniauth_callback_path(server['provider_name']), id: 'new_ldap_user' ) do + = text_field_tag :username, nil, {class: "form-control top", placeholder: "#{server['label']} Login", autofocus: "autofocus"} = password_field_tag :password, nil, {class: "form-control bottom", placeholder: "Password"} - = button_tag "LDAP Sign in", class: "btn-save btn" + = button_tag "#{server['label']} Sign in", class: "btn-save btn" diff --git a/app/views/devise/shared/_signin_box.html.haml b/app/views/devise/shared/_signin_box.html.haml index 8faa6398a60..c76574db457 100644 --- a/app/views/devise/shared/_signin_box.html.haml +++ b/app/views/devise/shared/_signin_box.html.haml @@ -17,7 +17,7 @@ .tab-content - @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'] + = render 'devise/sessions/new_ldap', server: server - if signin_enabled? %div#tab-signin.tab-pane = render 'devise/sessions/new_base' -- cgit v1.2.1