accounts-frontend/packages/app/components/auth/login/LoginBody.js

31 lines
651 B
JavaScript
Raw Normal View History

2017-08-23 00:27:35 +05:30
import React from 'react';
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 {
static displayName = 'LoginBody';
static panelId = 'login';
static hasGoBack = state => {
return !state.user.isGuest;
};
2016-05-14 16:56:17 +05:30
autoFocusField = 'login';
2016-05-14 16:56:17 +05:30
render() {
return (
<div>
{this.renderErrors()}
2016-05-14 16:56:17 +05:30
<Input
{...this.bindField('login')}
icon="envelope"
required
placeholder={messages.emailOrUsername}
/>
</div>
);
}
2016-05-14 16:56:17 +05:30
}