2017-08-23 00:27:35 +05:30
|
|
|
import React from 'react';
|
2016-05-14 16:56:17 +05:30
|
|
|
import { Input } from 'components/ui/form';
|
|
|
|
import BaseAuthBody from 'components/auth/BaseAuthBody';
|
|
|
|
|
|
|
|
import messages from './Login.intl.json';
|
|
|
|
|
|
|
|
export default class LoginBody extends BaseAuthBody {
|
|
|
|
static displayName = 'LoginBody';
|
|
|
|
static panelId = 'login';
|
2017-01-29 21:06:21 +05:30
|
|
|
static hasGoBack = (state) => {
|
|
|
|
return !state.user.isGuest;
|
|
|
|
};
|
2016-05-14 16:56:17 +05:30
|
|
|
|
|
|
|
autoFocusField = 'login';
|
|
|
|
|
|
|
|
render() {
|
|
|
|
return (
|
|
|
|
<div>
|
|
|
|
{this.renderErrors()}
|
|
|
|
|
|
|
|
<Input {...this.bindField('login')}
|
|
|
|
icon="envelope"
|
|
|
|
required
|
|
|
|
placeholder={messages.emailOrUsername}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|