2016-05-14 16:56:17 +05:30
|
|
|
import React from 'react';
|
|
|
|
|
|
|
|
import icons from 'components/ui/icons.scss';
|
|
|
|
import { Input, Checkbox } from 'components/ui/form';
|
|
|
|
import BaseAuthBody from 'components/auth/BaseAuthBody';
|
|
|
|
|
2018-03-26 00:46:45 +05:30
|
|
|
import authStyles from 'components/auth/auth.scss';
|
2016-05-14 16:56:17 +05:30
|
|
|
import styles from './password.scss';
|
|
|
|
import messages from './Password.intl.json';
|
|
|
|
|
|
|
|
export default class PasswordBody extends BaseAuthBody {
|
|
|
|
static displayName = 'PasswordBody';
|
|
|
|
static panelId = 'password';
|
|
|
|
static hasGoBack = true;
|
|
|
|
|
|
|
|
autoFocusField = 'password';
|
|
|
|
|
|
|
|
render() {
|
|
|
|
const {user} = this.context;
|
|
|
|
|
|
|
|
return (
|
|
|
|
<div>
|
|
|
|
{this.renderErrors()}
|
|
|
|
|
|
|
|
<div className={styles.miniProfile}>
|
|
|
|
<div className={styles.avatar}>
|
|
|
|
{user.avatar
|
|
|
|
? <img src={user.avatar} />
|
|
|
|
: <span className={icons.user} />
|
|
|
|
}
|
|
|
|
</div>
|
|
|
|
<div className={styles.email}>
|
|
|
|
{user.email || user.username}
|
|
|
|
</div>
|
|
|
|
</div>
|
2016-06-04 19:16:39 +05:30
|
|
|
|
2016-05-14 16:56:17 +05:30
|
|
|
<Input {...this.bindField('password')}
|
|
|
|
icon="key"
|
|
|
|
type="password"
|
|
|
|
required
|
|
|
|
placeholder={messages.accountPassword}
|
|
|
|
/>
|
|
|
|
|
2018-03-26 00:46:45 +05:30
|
|
|
<div className={authStyles.checkboxInput}>
|
|
|
|
<Checkbox {...this.bindField('rememberMe')}
|
|
|
|
defaultChecked
|
|
|
|
label={messages.rememberMe}
|
|
|
|
/>
|
|
|
|
</div>
|
2016-05-14 16:56:17 +05:30
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|