summaryrefslogtreecommitdiffstats
path: root/webapp/components/login
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2016-04-13 19:31:01 -0400
committerCorey Hulen <corey@hulen.com>2016-04-13 16:31:01 -0700
commit8c2c8921446c0e098fdbc1e4287fc5e9b475d88a (patch)
treefc83c5009bbbe7c73da19cd8e8dbfb69f99793cd /webapp/components/login
parentc801ce7cd74e7963dbe3b49601f84830dec16bd0 (diff)
downloadchat-8c2c8921446c0e098fdbc1e4287fc5e9b475d88a.tar.gz
chat-8c2c8921446c0e098fdbc1e4287fc5e9b475d88a.tar.bz2
chat-8c2c8921446c0e098fdbc1e4287fc5e9b475d88a.zip
Allow customization of LDAP login fields (#2692)
Diffstat (limited to 'webapp/components/login')
-rw-r--r--webapp/components/login/components/login_ldap.jsx18
1 files changed, 16 insertions, 2 deletions
diff --git a/webapp/components/login/components/login_ldap.jsx b/webapp/components/login/components/login_ldap.jsx
index a2013710f..36b8a406c 100644
--- a/webapp/components/login/components/login_ldap.jsx
+++ b/webapp/components/login/components/login_ldap.jsx
@@ -52,6 +52,20 @@ export default class LoginLdap extends React.Component {
errorClass = ' has-error';
}
+ let loginPlaceholder;
+ if (global.window.mm_config.LdapLoginFieldName) {
+ loginPlaceholder = global.window.mm_config.LdapLoginFieldName;
+ } else {
+ loginPlaceholder = Utils.localizeMessage('login_ldap.username', 'LDAP Username');
+ }
+
+ let passwordPlaceholder;
+ if (global.window.mm_config.LdapPasswordFieldName) {
+ passwordPlaceholder = global.window.mm_config.LdapPasswordFieldName;
+ } else {
+ passwordPlaceholder = Utils.localizeMessage('login_ldap.pwd', 'LDAP Password');
+ }
+
return (
<form onSubmit={this.handleSubmit}>
<div className='signup__email-container'>
@@ -63,7 +77,7 @@ export default class LoginLdap extends React.Component {
autoFocus={true}
className='form-control'
ref='id'
- placeholder={Utils.localizeMessage('login_ldap.username', 'LDAP Username')}
+ placeholder={loginPlaceholder}
spellCheck='false'
/>
</div>
@@ -72,7 +86,7 @@ export default class LoginLdap extends React.Component {
type='password'
className='form-control'
ref='password'
- placeholder={Utils.localizeMessage('login_ldap.pwd', 'LDAP Password')}
+ placeholder={passwordPlaceholder}
spellCheck='false'
/>
</div>