mirror of
https://github.com/ascribe/onion.git
synced 2025-02-14 21:10:27 +01:00
39 lines
1.2 KiB
JavaScript
39 lines
1.2 KiB
JavaScript
'use strict';
|
|
|
|
import React from 'react';
|
|
import Link from 'react-router/es6/Link';
|
|
|
|
import LoginForm from './ascribe_forms/form_login';
|
|
|
|
import withContext from './context/with_context';
|
|
import { whitelabelShape } from './prop_types';
|
|
|
|
import { setDocumentTitle } from '../utils/dom_utils';
|
|
import { getLangText } from '../utils/lang_utils';
|
|
|
|
|
|
let LoginContainer = React.createClass({
|
|
propTypes: {
|
|
// Injected through HOCs
|
|
whitelabel: whitelabelShape.isRequired
|
|
},
|
|
|
|
render() {
|
|
const { whitelabel: { name: whitelabelName } } = this.props;
|
|
|
|
setDocumentTitle(getLangText('Log in'));
|
|
|
|
return (
|
|
<div className="ascribe-login-wrapper">
|
|
<LoginForm whitelabelName={whitelabelName} />
|
|
<div className="ascribe-login-text">
|
|
{getLangText(`Not a ${whitelabelName || 'ascribe'} user`)}? <Link to="/signup">{getLangText('Sign up')}...</Link><br/>
|
|
{getLangText('Forgot my password')}? <Link to="/password_reset">{getLangText('Rescue me')}...</Link>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|
|
});
|
|
|
|
export default withContext(LoginContainer, 'whitelabel');
|