summaryrefslogtreecommitdiffstats
path: root/webapp/components
diff options
context:
space:
mode:
authorenahum <nahumhbl@gmail.com>2016-09-02 12:22:47 -0300
committerChristopher Speller <crspeller@gmail.com>2016-09-02 11:22:47 -0400
commit438ff8f8bc924a42c634da6883558903938a1673 (patch)
tree81118252ef78dfe90c5f0798640a935590cd565a /webapp/components
parenteffd0840231474cc0f967f51fcec3780369ed916 (diff)
downloadchat-438ff8f8bc924a42c634da6883558903938a1673.tar.gz
chat-438ff8f8bc924a42c634da6883558903938a1673.tar.bz2
chat-438ff8f8bc924a42c634da6883558903938a1673.zip
PLT-4036 Fix disable button on LDAP sign up page (#3920)
Diffstat (limited to 'webapp/components')
-rw-r--r--webapp/components/signup/components/signup_ldap.jsx33
1 files changed, 28 insertions, 5 deletions
diff --git a/webapp/components/signup/components/signup_ldap.jsx b/webapp/components/signup/components/signup_ldap.jsx
index 92089f2f7..dc3deba19 100644
--- a/webapp/components/signup/components/signup_ldap.jsx
+++ b/webapp/components/signup/components/signup_ldap.jsx
@@ -28,8 +28,29 @@ export default class SignupLdap extends React.Component {
this.handleLdapSignup = this.handleLdapSignup.bind(this);
this.handleLdapSignupSuccess = this.handleLdapSignupSuccess.bind(this);
+ this.handleLdapIdChange = this.handleLdapIdChange.bind(this);
+ this.handleLdapPasswordChange = this.handleLdapPasswordChange.bind(this);
+
this.state = ({
- ldapError: ''
+ ldapError: '',
+ ldapId: '',
+ ldapPassword: ''
+ });
+ }
+
+ handleLdapIdChange(e) {
+ e.preventDefault();
+
+ this.setState({
+ ldapId: e.target.value
+ });
+ }
+
+ handleLdapPasswordChange(e) {
+ e.preventDefault();
+
+ this.setState({
+ ldapPassword: e.target.value
});
}
@@ -39,8 +60,8 @@ export default class SignupLdap extends React.Component {
this.setState({ldapError: ''});
Client.webLoginByLdap(
- this.refs.id.value.trim(),
- this.refs.password.value,
+ this.state.ldapId,
+ this.state.ldapPassword,
null,
this.handleLdapSignupSuccess,
(err) => {
@@ -118,8 +139,9 @@ export default class SignupLdap extends React.Component {
<input
className='form-control'
name='ldapId'
- ref='id'
+ value={this.state.ldapId}
placeholder={ldapIdPlaceholder}
+ onChange={this.handleLdapIdChange}
spellCheck='false'
autoCapitalize='off'
/>
@@ -129,8 +151,9 @@ export default class SignupLdap extends React.Component {
type='password'
className='form-control'
name='password'
- ref='password'
+ value={this.state.ldapPassword}
placeholder={Utils.localizeMessage('login.password', 'Password')}
+ onChange={this.handleLdapPasswordChange}
spellCheck='false'
/>
</div>