mirror of
				https://github.com/vector-im/element-web.git
				synced 2025-10-31 00:01:23 +01:00 
			
		
		
		
	Don't lose username & password on login failure
This commit is contained in:
		
							parent
							
								
									caa7f813eb
								
							
						
					
					
						commit
						337e6b329f
					
				| @ -124,8 +124,8 @@ module.exports = React.createClass({ | |||||||
|                 return ( |                 return ( | ||||||
|                     <div> |                     <div> | ||||||
|                         <form onSubmit={this.onUserPassEntered}> |                         <form onSubmit={this.onUserPassEntered}> | ||||||
|                         <input className="mx_Login_field" ref="user" type="text" placeholder="Email or user name" /><br /> |                         <input className="mx_Login_field" ref="user" type="text" value={this.state.username} onChange={this.onUsernameChanged} placeholder="Email or user name" /><br /> | ||||||
|                         <input className="mx_Login_field" ref="pass" type="password" placeholder="Password" /><br /> |                         <input className="mx_Login_field" ref="pass" type="password" value={this.state.password} onChange={this.onPasswordChanged} placeholder="Password" /><br /> | ||||||
|                         {this.componentForStep('choose_hs')} |                         {this.componentForStep('choose_hs')} | ||||||
|                         <input className="mx_Login_submit" type="submit" value="Log in" /> |                         <input className="mx_Login_submit" type="submit" value="Log in" /> | ||||||
|                         </form> |                         </form> | ||||||
| @ -134,6 +134,14 @@ module.exports = React.createClass({ | |||||||
|         } |         } | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|  |     onUsernameChanged: function(ev) { | ||||||
|  |         this.setState({username: ev.target.value}); | ||||||
|  |     }, | ||||||
|  | 
 | ||||||
|  |     onPasswordChanged: function(ev) { | ||||||
|  |         this.setState({password: ev.target.value}); | ||||||
|  |     }, | ||||||
|  | 
 | ||||||
|     loginContent: function() { |     loginContent: function() { | ||||||
|         if (this.state.busy) { |         if (this.state.busy) { | ||||||
|             return ( |             return ( | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user