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