2015-06-20 16:43:18 +02:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
import React from 'react';
|
2015-09-30 18:30:50 +02:00
|
|
|
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
|
|
|
|
2015-07-01 18:58:13 +02:00
|
|
|
import { getLangText } from '../utils/lang_utils';
|
2015-10-13 16:42:40 +02:00
|
|
|
import { setDocumentTitle } from '../utils/dom_utils';
|
2015-07-01 18:58:13 +02:00
|
|
|
|
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: {
|
2016-01-11 12:54:15 +01:00
|
|
|
// Provided from AscribeApp
|
|
|
|
currentUser: React.PropTypes.object,
|
|
|
|
whitelabel: React.PropTypes.object,
|
|
|
|
|
2016-01-11 16:26:36 +01:00
|
|
|
// Provided from router
|
2015-10-01 11:16:38 +02:00
|
|
|
location: React.PropTypes.object
|
2015-07-02 15:40:54 +02:00
|
|
|
},
|
|
|
|
|
2015-06-20 16:43:18 +02:00
|
|
|
render() {
|
2015-10-13 16:42:40 +02:00
|
|
|
setDocumentTitle(getLangText('Log in'));
|
|
|
|
|
2015-06-20 16:43:18 +02:00
|
|
|
return (
|
|
|
|
<div className="ascribe-login-wrapper">
|
2016-01-11 18:07:52 +01:00
|
|
|
<LoginForm location={this.props.location} />
|
2015-07-07 10:28:39 +02:00
|
|
|
<div className="ascribe-login-text">
|
2015-09-30 18:30:50 +02:00
|
|
|
{getLangText('Not an ascribe user')}? <Link to="/signup">{getLangText('Sign up')}...</Link><br/>
|
|
|
|
{getLangText('Forgot my password')}? <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>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-07-01 18:58:13 +02:00
|
|
|
export default LoginContainer;
|