diff options
Diffstat (limited to 'web')
-rw-r--r-- | web/react/components/signup_team_complete.jsx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/web/react/components/signup_team_complete.jsx b/web/react/components/signup_team_complete.jsx index 99dcf6f5f..30fe92af5 100644 --- a/web/react/components/signup_team_complete.jsx +++ b/web/react/components/signup_team_complete.jsx @@ -324,7 +324,7 @@ EmailItem = React.createClass({ getValue: function() { return this.refs.email.getDOMNode().value.trim() }, - validate: function() { + validate: function(teamEmail) { var email = this.refs.email.getDOMNode().value.trim().toLowerCase(); if (!email) { @@ -336,6 +336,11 @@ EmailItem = React.createClass({ this.setState(this.state); return false; } + else if (email === teamEmail) { + this.state.email_error = "Please use an a different email than the one used at signup"; + this.setState(this.state); + return false; + } else { this.state.email_error = ""; this.setState(this.state); @@ -375,7 +380,7 @@ SendInivtesPage = React.createClass({ var emails = []; for (var i = 0; i < this.props.state.invites.length; i++) { - if (!this.refs['email_' + i].validate()) { + if (!this.refs['email_' + i].validate(this.props.state.team.email)) { valid = false; } else { emails.push(this.refs['email_' + i].getValue()); |