Diffstat (limited to 'frontend/delta/js/Clipperz/PM/UI/Components/LoginForm.js') (more/less context) (ignore whitespace changes)
-rw-r--r-- | frontend/delta/js/Clipperz/PM/UI/Components/LoginForm.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/frontend/delta/js/Clipperz/PM/UI/Components/LoginForm.js b/frontend/delta/js/Clipperz/PM/UI/Components/LoginForm.js index 2b5b4a4..801549f 100644 --- a/frontend/delta/js/Clipperz/PM/UI/Components/LoginForm.js +++ b/frontend/delta/js/Clipperz/PM/UI/Components/LoginForm.js | |||
@@ -79,40 +79,40 @@ Clipperz.PM.UI.Components.LoginForm = React.createClass({ | |||
79 | 79 | ||
80 | //------------------------------------------------------------------------- | 80 | //------------------------------------------------------------------------- |
81 | 81 | ||
82 | shouldEnableLoginButton: function () { | 82 | shouldEnableLoginButton: function () { |
83 | var result; | 83 | var result; |
84 | 84 | ||
85 | return( | 85 | return( |
86 | ((this.state['username'] != '') && (this.state['passphrase'] != '')) | 86 | ((this.state['username'] != '') && (this.state['passphrase'] != '')) |
87 | || | 87 | || |
88 | (this.state['pin'] != '') | 88 | (this.state['pin'] != '') |
89 | ) && !this.props['disabled']; | 89 | ) && !this.props['disabled']; |
90 | }, | 90 | }, |
91 | 91 | ||
92 | 92 | ||
93 | loginForm: function () { | 93 | loginForm: function () { |
94 | registrationLink =React.DOM.div({'className':'registrationLink'}, [ | 94 | registrationLink =React.DOM.div({'className':'registrationLink'}, [ |
95 | React.DOM.a({'onClick':this.handleRegistrationLinkClick}, "Need an account") | 95 | React.DOM.a({'onClick':this.handleRegistrationLinkClick}, "Sign up") |
96 | ]); | 96 | ]); |
97 | returnReact.DOM.div({'className':'loginForm credentials'},[ | 97 | returnReact.DOM.div({'className':'loginForm credentials'},[ |
98 | React.DOM.form({onChange: this.handleChange, onSubmit:this.handleCredentialSubmit}, [ | 98 | React.DOM.form({onChange: this.handleChange, onSubmit:this.handleCredentialSubmit}, [ |
99 | React.DOM.div(null,[ | 99 | React.DOM.div(null,[ |
100 | React.DOM.label({'for':'name'}, "username"), | 100 | React.DOM.label({'for' :'name'}, "username"), |
101 | React.DOM.input({'type':'text', 'name':'name', 'ref':'username', 'placeholder':"username", 'key':'username', 'autoCapitalize':'none'}), | 101 | React.DOM.input({'type':'text', 'name':'name', 'ref':'username', 'placeholder':"username", 'key':'username', 'autoCapitalize':'none'}), |
102 | React.DOM.label({'for':'passphrase'}, "passphrase"), | 102 | React.DOM.label({'for' :'passphrase'}, "passphrase"), |
103 | React.DOM.input({'type':'password', 'name':'passphrase', 'ref':'passphrase', 'placeholder':"passphrase", 'key':'passphrase'}) | 103 | React.DOM.input({'type':'password', 'name':'passphrase', 'ref':'passphrase', 'placeholder':"passphrase", 'key':'passphrase'}) |
104 | ]), | 104 | ]), |
105 | React.DOM.button({'type':'submit', 'disabled':!this.shouldEnableLoginButton(), 'className':'button'}, "login") | 105 | React.DOM.button({'type':'submit', 'disabled':!this.shouldEnableLoginButton(), 'className':'button'}, "login") |
106 | ]), | 106 | ]), |
107 | this.props.isNewUserRegistrationAvailable ? registrationLink : null | 107 | this.props.isNewUserRegistrationAvailable ? registrationLink : null |
108 | ]); | 108 | ]); |
109 | }, | 109 | }, |
110 | 110 | ||
111 | handlePINSubmit: function (event) { | 111 | handlePINSubmit: function (event) { |
112 | event.preventDefault(); | 112 | event.preventDefault(); |
113 | 113 | ||
114 | this.refs['pin'].getDOMNode().blur(); | 114 | this.refs['pin'].getDOMNode().blur(); |
115 | 115 | ||
116 | var credentials = { | 116 | var credentials = { |
117 | pin: this.refs['pin'].getDOMNode().value | 117 | pin: this.refs['pin'].getDOMNode().value |
118 | } | 118 | } |