summaryrefslogtreecommitdiffstats
path: root/web/react
diff options
context:
space:
mode:
authorReed Garmsen <rgarmsen2295@gmail.com>2015-06-19 12:51:35 -0700
committerReed Garmsen <rgarmsen2295@gmail.com>2015-06-19 12:51:35 -0700
commit9b9b6bd2b7b8df92fe907915e4d80986492b7fd1 (patch)
tree5d73bf8ff7ade8031332cef50993f8acab23a951 /web/react
parent9f652310a5ee9c51633264d08434e4a08224a9eb (diff)
downloadchat-9b9b6bd2b7b8df92fe907915e4d80986492b7fd1.tar.gz
chat-9b9b6bd2b7b8df92fe907915e4d80986492b7fd1.tar.bz2
chat-9b9b6bd2b7b8df92fe907915e4d80986492b7fd1.zip
Made it so the team creator can no longer use the same email used at signup to send an invitation to
Diffstat (limited to 'web/react')
-rw-r--r--web/react/components/signup_team_complete.jsx9
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 b038679e6..65f4c9e0a 100644
--- a/web/react/components/signup_team_complete.jsx
+++ b/web/react/components/signup_team_complete.jsx
@@ -312,7 +312,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) {
@@ -324,6 +324,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);
@@ -363,7 +368,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());