diff options
author | Joram Wilander <jwawilander@gmail.com> | 2016-04-13 19:31:01 -0400 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2016-04-13 16:31:01 -0700 |
commit | 8c2c8921446c0e098fdbc1e4287fc5e9b475d88a (patch) | |
tree | fc83c5009bbbe7c73da19cd8e8dbfb69f99793cd /webapp/components/login | |
parent | c801ce7cd74e7963dbe3b49601f84830dec16bd0 (diff) | |
download | chat-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.jsx | 18 |
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> |