onion/js/components/login_container.js

44 lines
1.1 KiB
JavaScript
Raw Normal View History

2015-06-20 16:43:18 +02:00
'use strict';
import React from 'react';
import { Link } from 'react-router';
2015-06-20 16:43:18 +02:00
2015-07-13 16:57:25 +02:00
import LoginForm from './ascribe_forms/form_login';
2015-06-20 16:43:18 +02:00
import { getLangText } from '../utils/lang_utils';
import { setDocumentTitle } from '../utils/dom_utils';
2015-07-13 16:57:25 +02:00
2015-06-20 16:43:18 +02:00
let LoginContainer = React.createClass({
2015-07-02 15:40:54 +02:00
propTypes: {
// Provided from AscribeApp
currentUser: React.PropTypes.object,
whitelabel: React.PropTypes.object,
2016-01-11 16:26:36 +01:00
// Provided from router
location: React.PropTypes.object
2015-07-02 15:40:54 +02:00
},
2015-06-20 16:43:18 +02:00
render() {
const { whitelabel: { name: whitelabelName },
location } = this.props;
setDocumentTitle(getLangText('Log in'));
2015-06-20 16:43:18 +02:00
return (
<div className="ascribe-login-wrapper">
<LoginForm
location={location}
whitelabelName={whitelabelName} />
2015-07-07 10:28:39 +02:00
<div className="ascribe-login-text">
{getLangText('Forgot my password')}&#63; <Link to="/password_reset">{getLangText('Rescue me')}...</Link>
2015-07-07 10:28:39 +02:00
</div>
2015-06-20 16:43:18 +02:00
</div>
);
}
});
export default LoginContainer;