Added sign in link to the signup_user_complete page (#3248)
Этот коммит содержится в:
коммит произвёл
enahum
родитель
919eea73b6
Коммит
5ac9053b5a
@@ -22,6 +22,13 @@ import React from 'react';
|
||||
import logoImage from 'images/logo.png';
|
||||
|
||||
export default class LoginController extends React.Component {
|
||||
static get propTypes() {
|
||||
return {
|
||||
location: React.PropTypes.object.isRequired,
|
||||
params: React.PropTypes.object.isRequired
|
||||
};
|
||||
}
|
||||
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
@@ -128,12 +135,31 @@ export default class LoginController extends React.Component {
|
||||
}
|
||||
|
||||
submit(loginId, password, token) {
|
||||
this.setState({serverError: null});
|
||||
|
||||
Client.webLogin(
|
||||
loginId,
|
||||
password,
|
||||
token,
|
||||
() => {
|
||||
this.setState({serverError: null});
|
||||
// check for query params brought over from signup_user_complete
|
||||
if (this.props.location.query.id || this.props.location.query.h) {
|
||||
Client.addUserToTeamFromInvite(
|
||||
this.props.location.query.d,
|
||||
this.props.location.query.h,
|
||||
this.props.location.query.id,
|
||||
() => {
|
||||
this.finishSignin();
|
||||
},
|
||||
() => {
|
||||
// there's not really a good way to deal with this, so just let the user log in like normal
|
||||
this.finishSignin();
|
||||
}
|
||||
);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
this.finishSignin();
|
||||
},
|
||||
(err) => {
|
||||
@@ -503,10 +529,4 @@ export default class LoginController extends React.Component {
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
LoginController.defaultProps = {
|
||||
};
|
||||
LoginController.propTypes = {
|
||||
params: React.PropTypes.object.isRequired
|
||||
};
|
||||
}
|
||||
@@ -22,6 +22,12 @@ import {browserHistory, Link} from 'react-router';
|
||||
import logoImage from 'images/logo.png';
|
||||
|
||||
export default class SignupUserComplete extends React.Component {
|
||||
static get propTypes() {
|
||||
return {
|
||||
location: React.PropTypes.object
|
||||
};
|
||||
}
|
||||
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
@@ -729,6 +735,22 @@ export default class SignupUserComplete extends React.Component {
|
||||
defaultMessage="Let's create your account"
|
||||
/>
|
||||
</h4>
|
||||
<span className='color--light'>
|
||||
<FormattedMessage
|
||||
id='signup_user_completed.haveAccount'
|
||||
defaultMessage='Already have an account?'
|
||||
/>
|
||||
{' '}
|
||||
<Link
|
||||
to={'/login'}
|
||||
query={this.props.location.query}
|
||||
>
|
||||
<FormattedMessage
|
||||
id='signup_user_completed.signIn'
|
||||
defaultMessage='Click here to sign in.'
|
||||
/>
|
||||
</Link>
|
||||
</span>
|
||||
{signupMessage}
|
||||
{ldapSignup}
|
||||
{emailSignup}
|
||||
@@ -739,10 +761,4 @@ export default class SignupUserComplete extends React.Component {
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
SignupUserComplete.defaultProps = {
|
||||
};
|
||||
SignupUserComplete.propTypes = {
|
||||
location: React.PropTypes.object
|
||||
};
|
||||
}
|
||||
Ссылка в новой задаче
Block a user