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';
|
import logoImage from 'images/logo.png';
|
||||||
|
|
||||||
export default class LoginController extends React.Component {
|
export default class LoginController extends React.Component {
|
||||||
|
static get propTypes() {
|
||||||
|
return {
|
||||||
|
location: React.PropTypes.object.isRequired,
|
||||||
|
params: React.PropTypes.object.isRequired
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
||||||
@@ -128,12 +135,31 @@ export default class LoginController extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
submit(loginId, password, token) {
|
submit(loginId, password, token) {
|
||||||
|
this.setState({serverError: null});
|
||||||
|
|
||||||
Client.webLogin(
|
Client.webLogin(
|
||||||
loginId,
|
loginId,
|
||||||
password,
|
password,
|
||||||
token,
|
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();
|
this.finishSignin();
|
||||||
},
|
},
|
||||||
(err) => {
|
(err) => {
|
||||||
@@ -503,10 +529,4 @@ export default class LoginController extends React.Component {
|
|||||||
</div>
|
</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';
|
import logoImage from 'images/logo.png';
|
||||||
|
|
||||||
export default class SignupUserComplete extends React.Component {
|
export default class SignupUserComplete extends React.Component {
|
||||||
|
static get propTypes() {
|
||||||
|
return {
|
||||||
|
location: React.PropTypes.object
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
||||||
@@ -729,6 +735,22 @@ export default class SignupUserComplete extends React.Component {
|
|||||||
defaultMessage="Let's create your account"
|
defaultMessage="Let's create your account"
|
||||||
/>
|
/>
|
||||||
</h4>
|
</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}
|
{signupMessage}
|
||||||
{ldapSignup}
|
{ldapSignup}
|
||||||
{emailSignup}
|
{emailSignup}
|
||||||
@@ -739,10 +761,4 @@ export default class SignupUserComplete extends React.Component {
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SignupUserComplete.defaultProps = {
|
|
||||||
};
|
|
||||||
SignupUserComplete.propTypes = {
|
|
||||||
location: React.PropTypes.object
|
|
||||||
};
|
|
||||||
@@ -1166,6 +1166,7 @@
|
|||||||
"signup_user_completed.expired": "You've already completed the signup process for this invitation or this invitation has expired.",
|
"signup_user_completed.expired": "You've already completed the signup process for this invitation or this invitation has expired.",
|
||||||
"signup_user_completed.gitlab": "with GitLab",
|
"signup_user_completed.gitlab": "with GitLab",
|
||||||
"signup_user_completed.google": "with Google",
|
"signup_user_completed.google": "with Google",
|
||||||
|
"signup_user_completed.haveAccount": "Already have an account?",
|
||||||
"signup_user_completed.invalid_invite": "The invite link was invalid. Please speak with your Administrator to receive an invitation.",
|
"signup_user_completed.invalid_invite": "The invite link was invalid. Please speak with your Administrator to receive an invitation.",
|
||||||
"signup_user_completed.lets": "Let's create your account",
|
"signup_user_completed.lets": "Let's create your account",
|
||||||
"signup_user_completed.no_open_server": "This server does not allow open signups. Please speak with your Administrator to receive an invitation.",
|
"signup_user_completed.no_open_server": "This server does not allow open signups. Please speak with your Administrator to receive an invitation.",
|
||||||
@@ -1175,6 +1176,7 @@
|
|||||||
"signup_user_completed.passwordLength": "Please enter at least {min} characters",
|
"signup_user_completed.passwordLength": "Please enter at least {min} characters",
|
||||||
"signup_user_completed.required": "This field is required",
|
"signup_user_completed.required": "This field is required",
|
||||||
"signup_user_completed.reserved": "This username is reserved, please choose a new one.",
|
"signup_user_completed.reserved": "This username is reserved, please choose a new one.",
|
||||||
|
"signup_user_completed.signIn": "Click here to sign in.",
|
||||||
"signup_user_completed.userHelp": "Username must begin with a letter, and contain between {min} to {max} lowercase characters made up of numbers, letters, and the symbols '.', '-' and '_'",
|
"signup_user_completed.userHelp": "Username must begin with a letter, and contain between {min} to {max} lowercase characters made up of numbers, letters, and the symbols '.', '-' and '_'",
|
||||||
"signup_user_completed.usernameLength": "Username must begin with a letter, and contain between {min} to {max} lowercase characters made up of numbers, letters, and the symbols '.', '-' and '_'.",
|
"signup_user_completed.usernameLength": "Username must begin with a letter, and contain between {min} to {max} lowercase characters made up of numbers, letters, and the symbols '.', '-' and '_'.",
|
||||||
"signup_user_completed.validEmail": "Please enter a valid email address",
|
"signup_user_completed.validEmail": "Please enter a valid email address",
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user