LoginView.js
1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import React,{ Component } from 'react';
import { Link } from 'react-router';
import { Row, Col, FormGroup,
ControlLabel, FormControl,
Button } from 'react-bootstrap';
import handleLogin from './login';
export class LoginView extends React.Component {
componentDidMount() {
handleLogin({ component: this });
}
handleSubmit(event) {
event.preventDefault();
}
render() {
return (
<div className="Login">
<Row>
<Col xs={ 12 } sm={ 6 } md={ 4 }>
<h4 className="page-header">Login</h4>
<form
ref={ form => (this.loginForm = form) }
className="login"
onSubmit={ this.handleSubmit }
>
<FormGroup>
<ControlLabel>Email Address</ControlLabel>
<FormControl
type="email"
ref="emailAddress"
name="emailAddress"
placeholder="Email Address"
/>
</FormGroup>
<FormGroup>
<ControlLabel>
<span className="pull-left">Password</span>
<Link className="pull-right" to="/recover-password">Forgot Password?</Link>
</ControlLabel>
<FormControl
type="password"
ref="password"
name="password"
placeholder="Password"
/>
</FormGroup>
<Button type="submit" bsStyle="success">Login</Button>
</form>
</Col>
</Row>
</div>
);
}
}