1
0
mirror of https://github.com/ascribe/onion.git synced 2024-11-16 01:55:07 +01:00
onion/js/components/login_container.js

47 lines
1.3 KiB
JavaScript
Raw Normal View History

2015-06-20 16:43:18 +02:00
'use strict';
import React from 'react';
import Router from 'react-router';
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';
2015-06-30 14:46:28 +02:00
let Link = Router.Link;
2015-06-20 16:43:18 +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: {
message: React.PropTypes.string,
redirectOnLoggedIn: React.PropTypes.bool,
redirectOnLoginSuccess: React.PropTypes.bool
2015-07-02 15:40:54 +02:00
},
getDefaultProps() {
return {
message: getLangText('Enter') + ' ascribe',
redirectOnLoggedIn: true,
redirectOnLoginSuccess: true
2015-07-02 15:40:54 +02:00
};
},
2015-06-20 16:43:18 +02:00
render() {
return (
<div className="ascribe-login-wrapper">
2015-07-10 16:34:34 +02:00
<LoginForm
redirectOnLoggedIn={this.props.redirectOnLoggedIn}
redirectOnLoginSuccess={this.props.redirectOnLoginSuccess}
2015-07-10 16:34:34 +02:00
message={this.props.message} />
2015-07-07 10:28:39 +02:00
<div className="ascribe-login-text">
{getLangText('Not an 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>
2015-06-20 16:43:18 +02:00
</div>
);
}
});
export default LoginContainer;