Fix ldap provider name in template

Before this fix it's impossible to set the provider name in the
sign-model since `ldap` is a boolean there and this way not able
to have an attribute like `ldap.providerName`.

Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
This commit is contained in:
Sheogorath 2018-01-26 10:42:06 +01:00
parent 0138911274
commit e44751b3f1
No known key found for this signature in database
GPG key ID: 1F05CC3635CDDFFD
2 changed files with 3 additions and 1 deletions

View file

@ -69,6 +69,7 @@ function showIndex (req, res, next) {
dropbox: config.isDropboxEnable, dropbox: config.isDropboxEnable,
google: config.isGoogleEnable, google: config.isGoogleEnable,
ldap: config.isLDAPEnable, ldap: config.isLDAPEnable,
ldapProviderName: config.ldap.providerName,
saml: config.isSAMLEnable, saml: config.isSAMLEnable,
email: config.isEmailEnable, email: config.isEmailEnable,
allowemailregister: config.allowemailregister, allowemailregister: config.allowemailregister,
@ -103,6 +104,7 @@ function responseHackMD (res, note) {
dropbox: config.isDropboxEnable, dropbox: config.isDropboxEnable,
google: config.isGoogleEnable, google: config.isGoogleEnable,
ldap: config.isLDAPEnable, ldap: config.isLDAPEnable,
ldapProviderName: config.ldap.providerName,
saml: config.isSAMLEnable, saml: config.isSAMLEnable,
email: config.isEmailEnable, email: config.isEmailEnable,
allowemailregister: config.allowemailregister, allowemailregister: config.allowemailregister,

View file

@ -52,7 +52,7 @@
<hr> <hr>
<% }%> <% }%>
<% if(ldap) { %> <% if(ldap) { %>
<h4>Via <% if (ldap.providerName) { %> <%- ldap.providerName %> (LDAP) <% } else { %> LDAP <% } %></h4> <h4>Via <% if (ldapProviderName) { %> <%= ldapProviderName %> (LDAP) <% } else { %> LDAP <% } %></h4>
<form data-toggle="validator" role="form" class="form-horizontal" method="post" enctype="application/x-www-form-urlencoded"> <form data-toggle="validator" role="form" class="form-horizontal" method="post" enctype="application/x-www-form-urlencoded">
<div class="form-group"> <div class="form-group">
<div class="col-sm-12"> <div class="col-sm-12">