2016-01-16 17:36:22 +05:30
|
|
|
import React, { Component } from 'react';
|
2016-01-18 10:58:43 +05:30
|
|
|
import { connect } from 'react-redux';
|
|
|
|
import { routeActions } from 'redux-simple-router';
|
2016-01-16 17:36:22 +05:30
|
|
|
|
|
|
|
import { FormattedMessage as Message } from 'react-intl';
|
2016-01-16 18:05:12 +05:30
|
|
|
import Helmet from 'react-helmet';
|
2016-01-16 17:36:22 +05:30
|
|
|
|
|
|
|
import buttons from 'components/ui/buttons.scss';
|
|
|
|
import icons from 'components/ui/icons.scss';
|
|
|
|
import { Panel, PanelBody, PanelFooter, PanelBodyHeader } from 'components/ui/Panel';
|
|
|
|
import { Input, Checkbox } from 'components/ui/Form';
|
|
|
|
|
|
|
|
import styles from './signIn.scss';
|
|
|
|
import messages from './SignIn.messages';
|
|
|
|
|
2016-01-18 10:58:43 +05:30
|
|
|
class Login extends Component {
|
2016-01-16 17:36:22 +05:30
|
|
|
displayName = 'Login';
|
|
|
|
|
|
|
|
render() {
|
|
|
|
return (
|
|
|
|
<div className={styles.signIn}>
|
2016-01-16 18:05:12 +05:30
|
|
|
<Helmet title="Login" />
|
|
|
|
|
2016-01-16 17:36:22 +05:30
|
|
|
<Panel title={<Message {...messages.signInTitle} />}>
|
|
|
|
<PanelBody>
|
|
|
|
<Input icon="envelope" type="email" placeholder="E-mail or username" />
|
|
|
|
</PanelBody>
|
|
|
|
<PanelFooter>
|
2016-01-18 10:58:43 +05:30
|
|
|
<button className={buttons.green} onClick={this.onSubmit}>
|
2016-01-16 17:36:22 +05:30
|
|
|
<Message {...messages.next} />
|
|
|
|
</button>
|
|
|
|
</PanelFooter>
|
|
|
|
</Panel>
|
|
|
|
<div className={styles.helpLinks}>
|
|
|
|
<a href="#">
|
|
|
|
<Message {...messages.forgotPassword} />
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
2016-01-18 10:58:43 +05:30
|
|
|
|
|
|
|
onSubmit = (event) => {
|
|
|
|
event.preventDefault();
|
|
|
|
|
|
|
|
this.props.push('/password');
|
|
|
|
};
|
2016-01-16 17:36:22 +05:30
|
|
|
}
|
2016-01-18 10:58:43 +05:30
|
|
|
|
|
|
|
|
|
|
|
export default connect(null, {
|
|
|
|
push: routeActions.push
|
|
|
|
})(Login);
|