Disabled the invite email portion of the team setup when email is disabled on the server
Этот коммит содержится в:
@@ -428,6 +428,8 @@ SendInivtesPage = React.createClass({
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
var valid = true;
|
var valid = true;
|
||||||
|
|
||||||
|
if (this.state.emailEnabled) {
|
||||||
var emails = [];
|
var emails = [];
|
||||||
|
|
||||||
for (var i = 0; i < this.props.state.invites.length; i++) {
|
for (var i = 0; i < this.props.state.invites.length; i++) {
|
||||||
@@ -438,13 +440,15 @@ SendInivtesPage = React.createClass({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!valid) {
|
if (valid) {
|
||||||
return;
|
this.props.state.invites = emails;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (valid) {
|
||||||
this.props.state.wizard = "username";
|
this.props.state.wizard = "username";
|
||||||
this.props.state.invites = emails;
|
|
||||||
this.props.updateParent(this.props.state);
|
this.props.updateParent(this.props.state);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
submitAddInvite: function (e) {
|
submitAddInvite: function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
@@ -461,14 +465,19 @@ SendInivtesPage = React.createClass({
|
|||||||
this.props.updateParent(this.props.state);
|
this.props.updateParent(this.props.state);
|
||||||
},
|
},
|
||||||
getInitialState: function() {
|
getInitialState: function() {
|
||||||
return { };
|
return {
|
||||||
|
emailEnabled: client.isEmailEnabledSynchronous()
|
||||||
|
};
|
||||||
},
|
},
|
||||||
render: function() {
|
render: function() {
|
||||||
|
|
||||||
client.track('signup', 'signup_team_05_send_invites');
|
client.track('signup', 'signup_team_05_send_invites');
|
||||||
|
|
||||||
var name_error = this.state.name_error ? <label className="control-label">{ this.state.name_error }</label> : null;
|
var name_error = this.state.name_error ? <label className="control-label">{ this.state.name_error }</label> : null;
|
||||||
|
|
||||||
|
var content = null;
|
||||||
|
var bottomContent = null;
|
||||||
|
|
||||||
|
if (this.state.emailEnabled) {
|
||||||
var emails = [];
|
var emails = [];
|
||||||
|
|
||||||
for (var i = 0; i < this.props.state.invites.length; i++) {
|
for (var i = 0; i < this.props.state.invites.length; i++) {
|
||||||
@@ -479,16 +488,31 @@ SendInivtesPage = React.createClass({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
content = (
|
||||||
|
<div>
|
||||||
|
{emails}
|
||||||
|
<div className="form-group text-right"><a href="#" onClick={this.submitAddInvite}>Add Invitation</a></div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
|
||||||
|
bottomContent = (
|
||||||
|
<p className="color--light">{"if you prefer, you can invite " + strings.Team + " members later"}<br /> and <a href="#" onClick={this.submitSkip}>skip this step</a> for now.</p>
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
content = (
|
||||||
|
<div className='form-group color--light'>Email is currently disabled for your team, and emails cannot be sent. Contact your system administrator to enable email and email invitations.</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<form>
|
<form>
|
||||||
<img className="signup-team-logo" src="/static/images/logo.png" />
|
<img className="signup-team-logo" src="/static/images/logo.png" />
|
||||||
<h2>{"Invite " + utils.toTitleCase(strings.Team) + " Members"}</h2>
|
<h2>{"Invite " + utils.toTitleCase(strings.Team) + " Members"}</h2>
|
||||||
{ emails }
|
{content}
|
||||||
<div className="form-group text-right"><a href="#" onClick={this.submitAddInvite}>Add Invitation</a></div>
|
|
||||||
<div className="form-group"><button type="submit" className="btn-primary btn" onClick={this.submitNext}>Next<i className="glyphicon glyphicon-chevron-right"></i></button></div>
|
<div className="form-group"><button type="submit" className="btn-primary btn" onClick={this.submitNext}>Next<i className="glyphicon glyphicon-chevron-right"></i></button></div>
|
||||||
</form>
|
</form>
|
||||||
<p className="color--light">{"if you prefer, you can invite " + strings.Team + " members later"}<br /> and <a href="#" onClick={this.submitSkip}>skip this step</a> for now.</p>
|
{bottomContent}
|
||||||
<div className="margin--extra">
|
<div className="margin--extra">
|
||||||
<a href="#" onClick={this.submitBack}>Back to previous step</a>
|
<a href="#" onClick={this.submitBack}>Back to previous step</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user