1
0
mirror of https://github.com/ascribe/onion.git synced 2024-06-10 11:35:13 +02:00
onion/js/components/login_container.js
Tim Daubenschütz bc3093d4d7 Whitelabel login form
- also make some changes to signup form
2016-03-07 14:04:34 +01:00

45 lines
1.2 KiB
JavaScript

'use strict';
import React from 'react';
import { Link } from 'react-router';
import LoginForm from './ascribe_forms/form_login';
import { getLangText } from '../utils/lang_utils';
import { setDocumentTitle } from '../utils/dom_utils';
let LoginContainer = React.createClass({
propTypes: {
// Provided from AscribeApp
currentUser: React.PropTypes.object,
whitelabel: React.PropTypes.object,
// Provided from router
location: React.PropTypes.object
},
render() {
const { whitelabel: { name: whitelabelName },
location } = this.props;
setDocumentTitle(getLangText('Log in'));
return (
<div className="ascribe-login-wrapper">
<LoginForm
location={location}
whitelabelName={whitelabelName} />
<div className="ascribe-login-text">
{getLangText(`Not a ${whitelabelName || 'ascribe'} user`)}&#63; <Link to="/signup">{getLangText('Sign up')}...</Link><br/>
{getLangText('Forgot my password')}&#63; <Link to="/password_reset">{getLangText('Rescue me')}...</Link>
</div>
</div>
);
}
});
export default LoginContainer;