merged with new team domain changes and added signup/login links for gitlab
Этот коммит содержится в:
@@ -113,7 +113,7 @@ module.exports = React.createClass({
|
||||
<button type="submit" className="btn btn-primary">Sign in</button>
|
||||
</div>
|
||||
<div className="form-group form-group--small">
|
||||
<span><a href="#">{"Log in with GitLab"}</a></span>
|
||||
<span><a href={"/"+teamName+"/login/gitlab"}>{"Log in with GitLab"}</a></span>
|
||||
</div>
|
||||
<div className="form-group form-group--small">
|
||||
<span><a href="/find_team">{"Find other " + strings.TeamPlural}</a></span>
|
||||
|
||||
@@ -46,7 +46,7 @@ module.exports = React.createClass({
|
||||
function(data) {
|
||||
client.track('signup', 'signup_user_02_complete');
|
||||
|
||||
client.loginByEmail(this.props.domain, this.state.user.email, this.state.user.password,
|
||||
client.loginByEmail(this.props.teamName, this.state.user.email, this.state.user.password,
|
||||
function(data) {
|
||||
UserStore.setLastEmail(this.state.user.email);
|
||||
UserStore.setCurrentUser(data);
|
||||
@@ -58,7 +58,7 @@ module.exports = React.createClass({
|
||||
}.bind(this),
|
||||
function(err) {
|
||||
if (err.message == "Login failed because email address has not been verified") {
|
||||
window.location.href = "/verify_email?email="+ encodeURIComponent(this.state.user.email) + "&domain=" + encodeURIComponent(this.props.domain);
|
||||
window.location.href = "/verify_email?email="+ encodeURIComponent(this.state.user.email) + "&domain=" + encodeURIComponent(this.props.teamName);
|
||||
} else {
|
||||
this.state.server_error = err.message;
|
||||
this.setState(this.state);
|
||||
@@ -79,7 +79,7 @@ module.exports = React.createClass({
|
||||
props = {};
|
||||
props.wizard = "welcome";
|
||||
props.user = {};
|
||||
props.user.team_id = this.props.team_id;
|
||||
props.user.team_id = this.props.teamId;
|
||||
props.user.email = this.props.email;
|
||||
props.hash = this.props.hash;
|
||||
props.data = this.props.data;
|
||||
@@ -116,7 +116,10 @@ module.exports = React.createClass({
|
||||
<div>
|
||||
<img className="signup-team-logo" src="/static/images/logo.png" />
|
||||
<h4>Welcome to { config.SiteName }</h4>
|
||||
<p>{"Choose your username and password for the " + this.props.team_name + " " + strings.Team +"."}</p>
|
||||
<div className="form-group form-group--small">
|
||||
<span></span>
|
||||
</div>
|
||||
<p>{"Choose your username and password for the " + this.props.teamDisplayName + " " + strings.Team} <a href={"/"+this.props.teamName+"/signup/gitlab"}>{"or sign up with GitLab."}</a></p>
|
||||
<p>Your username can be made of lowercase letters and numbers.</p>
|
||||
<label className="control-label">Username</label>
|
||||
<div className={ name_error ? "form-group has-error" : "form-group" }>
|
||||
|
||||
@@ -33,7 +33,7 @@ module.exports = React.createClass({
|
||||
client.createUser(user, "", "",
|
||||
function(data) {
|
||||
client.track('signup', 'signup_user_oauth_02');
|
||||
window.location.href = '/login/'+user.auth_service+'?id='+user.team_id;
|
||||
window.location.href = '/' + this.props.teamName + '/login/'+user.auth_service;
|
||||
}.bind(this),
|
||||
function(err) {
|
||||
this.state.server_error = err.message;
|
||||
@@ -63,14 +63,14 @@ module.exports = React.createClass({
|
||||
<div>
|
||||
<img className="signup-team-logo" src="/static/images/logo.png" />
|
||||
<h4>Welcome to { config.SiteName }</h4>
|
||||
<p>{"To continue signing up with " + this.state.user.auth_type + ", please register a username."}</p>
|
||||
<p>{"To continue signing up with " + this.state.user.auth_service + ", please register a username."}</p>
|
||||
<p>Your username can be made of lowercase letters and numbers.</p>
|
||||
<label className="control-label">Username</label>
|
||||
<div className={ name_error ? "form-group has-error" : "form-group" }>
|
||||
<input type="text" ref="name" className="form-control" placeholder="" maxLength="128" value={this.state.user.username} onChange={this.handleChange} />
|
||||
{ name_error }
|
||||
</div>
|
||||
<p>{"Pick something " + strings.Team + "mates will recognize. Your username is how you will appear to others"}</p>
|
||||
<p>{"Pick something " + strings.Team + "mates will recognize. Your username is how you will appear to others."}</p>
|
||||
<p>{ yourEmailIs } You’ll use this address to sign in to {config.SiteName}.</p>
|
||||
<div className="checkbox"><label><input type="checkbox" ref="email_service" /> It's ok to send me occassional email with updates about the {config.SiteName} service. </label></div>
|
||||
<p><button onClick={this.handleSubmit} className="btn-primary btn">Create Account</button></p>
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
|
||||
var SignupUserComplete =require('../components/signup_user_complete.jsx');
|
||||
|
||||
global.window.setup_signup_user_complete_page = function(email, domain, name, id, data, hash) {
|
||||
global.window.setup_signup_user_complete_page = function(email, name, ui_name, id, data, hash) {
|
||||
React.render(
|
||||
<SignupUserComplete team_id={id} domain={domain} team_name={name} email={email} hash={hash} data={data} />,
|
||||
<SignupUserComplete teamId={id} teamName={name} teamDisplayName={ui_name} email={email} hash={hash} data={data} />,
|
||||
document.getElementById('signup-user-complete')
|
||||
);
|
||||
};
|
||||
};
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
|
||||
var SignupUserOAuth = require('../components/signup_user_oauth.jsx');
|
||||
|
||||
global.window.setup_signup_user_oauth_page = function(user) {
|
||||
global.window.setup_signup_user_oauth_page = function(user, team_name, team_display_name) {
|
||||
React.render(
|
||||
<SignupUserOAuth user={user} />,
|
||||
<SignupUserOAuth user={user} teamName={team_name} teamDisplayName={team_display_name} />,
|
||||
document.getElementById('signup-user-complete')
|
||||
);
|
||||
};
|
||||
|
||||
Ссылка в новой задаче
Block a user