/
Login.jsx
78 lines (58 loc) · 1.94 KB
/
Login.jsx
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
import React from 'react';
import Router from 'react-router';
import {Panel, Input, Button} from 'react-bootstrap';
import { History } from 'history';
import ReactCSSTransitionGroup from 'react-addons-css-transition-group';
import $ from "jQuery";
var LoginPage = React.createClass({
getInitialState: function(){
return {
loginID: '',
password: '',
isSubmitted: false
};
},
mixins: [History],
render: function(){
return(
<div className="login-page ng-scope ui-view">
<div className="row">
<div className="col-md-4 col-lg-4 col-md-offset-4 col-lg-offset-4">
<img src={require("../../common/images/flat-avatar.png")} className="user-avatar" />
<h1>Ani Theme <small>Free Edition</small></h1>
<form role="form" onSubmit={this.handleLogin} className="ng-pristine ng-valid">
<div className="form-content">
<div className="form-group">
<input type="text" className="form-control input-underline input-lg" placeholder="Email" />
</div>
<div className="form-group">
<input type="password" className="form-control input-underline input-lg" placeholder="Password" />
</div>
</div>
<button type="submit" className="btn btn-white btn-outline btn-lg btn-rounded">Login</button>
</form>
</div>
</div>
</div>
);
},
setLoginID: function(e) {
this.setState({
loginID: e.target.value,
loginError: ''
});
},
setPassword: function(e) {
this.setState({
password: e.target.value,
loginError: ''
});
},
handleLogin: function(e){
e.preventDefault();
this.props.history.pushState(null, '/');
// this.transitionTo('dashboard');
return false;
}
});
export default LoginPage;