2016-01-16 17:36:22 +05:30
|
|
|
|
import React, { Component } from 'react';
|
|
|
|
|
|
|
|
|
|
import { FormattedMessage as Message } from 'react-intl';
|
2016-01-19 11:47:21 +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';
|
|
|
|
|
|
2016-01-19 11:47:21 +05:30
|
|
|
|
import styles from './password.scss';
|
|
|
|
|
import {helpLinks as helpLinksStyles} from './helpLinks.scss';
|
|
|
|
|
import messages from './Password.messages';
|
2016-01-16 17:36:22 +05:30
|
|
|
|
|
2016-01-31 18:29:38 +05:30
|
|
|
|
export default function Password() {
|
|
|
|
|
var Title = () => ( // TODO: separate component for PageTitle
|
|
|
|
|
<Message {...messages.passwordTitle}>
|
|
|
|
|
{(msg) => <span>{msg}<Helmet title={msg} /></span>}
|
|
|
|
|
</Message>
|
|
|
|
|
);
|
|
|
|
|
Title.goBack = '/login';
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
Title,
|
|
|
|
|
Body: () => (
|
|
|
|
|
<div>
|
|
|
|
|
<PanelBodyHeader type="error">
|
|
|
|
|
<Message {...messages.invalidPassword} />
|
|
|
|
|
<br/>
|
|
|
|
|
<Message {...messages.suggestResetPassword} values={{
|
|
|
|
|
link: (
|
|
|
|
|
<a href="#">
|
|
|
|
|
<Message {...messages.forgotYourPassword} />
|
|
|
|
|
</a>
|
|
|
|
|
)
|
|
|
|
|
}} />
|
|
|
|
|
</PanelBodyHeader>
|
|
|
|
|
<div className={styles.miniProfile}>
|
|
|
|
|
<div className={styles.avatar}>
|
|
|
|
|
{/*<img src="//lorempixel.com/g/90/90" />*/}
|
|
|
|
|
<span className={icons.user} />
|
|
|
|
|
</div>
|
|
|
|
|
<div className={styles.email}>
|
|
|
|
|
{/* На деле тут может быть и ник, в зависимости от того, что введут в 1 вьюху */}
|
|
|
|
|
erickskrauch@yandex.ru
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<Input icon="key" type="password" placeholder={messages.accountPassword} />
|
|
|
|
|
|
|
|
|
|
<Checkbox label={<Message {...messages.rememberMe} />} />
|
|
|
|
|
</div>
|
|
|
|
|
),
|
|
|
|
|
Footer: (props) => (
|
|
|
|
|
<button className={buttons.green} onClick={(event) => {
|
|
|
|
|
event.preventDefault();
|
|
|
|
|
|
|
|
|
|
props.history.push('/oauth/permissions');
|
|
|
|
|
}}>
|
|
|
|
|
<Message {...messages.signInButton} />
|
|
|
|
|
</button>
|
|
|
|
|
),
|
|
|
|
|
Links: () => (
|
|
|
|
|
<a href="#">
|
|
|
|
|
<Message {...messages.forgotPassword} />
|
|
|
|
|
</a>
|
|
|
|
|
)
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export class _Password extends Component {
|
2016-01-16 17:36:22 +05:30
|
|
|
|
displayName = 'Password';
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
|
return (
|
2016-01-19 11:47:21 +05:30
|
|
|
|
<div>
|
|
|
|
|
<Message {...messages.passwordTitle}>
|
|
|
|
|
{(msg) => <Helmet title={msg} />}
|
|
|
|
|
</Message>
|
|
|
|
|
|
|
|
|
|
<Panel icon="arrowLeft" title={<Message {...messages.passwordTitle} />}>
|
2016-01-16 17:36:22 +05:30
|
|
|
|
<PanelBody>
|
|
|
|
|
<PanelBodyHeader type="error">
|
|
|
|
|
<Message {...messages.invalidPassword} />
|
|
|
|
|
<br/>
|
|
|
|
|
<Message {...messages.suggestResetPassword} values={{
|
|
|
|
|
link: (
|
|
|
|
|
<a href="#">
|
|
|
|
|
<Message {...messages.forgotYourPassword} />
|
|
|
|
|
</a>
|
|
|
|
|
)
|
|
|
|
|
}} />
|
|
|
|
|
</PanelBodyHeader>
|
|
|
|
|
<div className={styles.miniProfile}>
|
|
|
|
|
<div className={styles.avatar}>
|
|
|
|
|
{/*<img src="//lorempixel.com/g/90/90" />*/}
|
|
|
|
|
<span className={icons.user} />
|
|
|
|
|
</div>
|
|
|
|
|
<div className={styles.email}>
|
|
|
|
|
{/* На деле тут может быть и ник, в зависимости от того, что введут в 1 вьюху */}
|
|
|
|
|
erickskrauch@yandex.ru
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2016-01-19 11:47:21 +05:30
|
|
|
|
<Input icon="key" type="password" placeholder={messages.accountPassword} />
|
2016-01-16 17:36:22 +05:30
|
|
|
|
|
|
|
|
|
<Checkbox label={<Message {...messages.rememberMe} />} />
|
|
|
|
|
</PanelBody>
|
|
|
|
|
<PanelFooter>
|
|
|
|
|
<button className={buttons.green}>
|
|
|
|
|
<Message {...messages.signInButton} />
|
|
|
|
|
</button>
|
|
|
|
|
</PanelFooter>
|
|
|
|
|
</Panel>
|
2016-01-19 11:47:21 +05:30
|
|
|
|
<div className={helpLinksStyles}>
|
2016-01-16 17:36:22 +05:30
|
|
|
|
<a href="#">
|
|
|
|
|
<Message {...messages.forgotPassword} />
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|