From 227586e09af8c1ad1466a72078e5644d8368797f Mon Sep 17 00:00:00 2001
From: Pieter Lexis <pieterlexis@users.noreply.github.com>
Date: Thu, 29 Jun 2017 15:04:14 +0200
Subject: [PLT-5639] Show a message when invited addresses are blocked (#6691)

* Show a message when invited addresses are blocked

When using the "Send Email Invite" functionality. Emails were sent to
domains that were not on the `RestrictCreationToDomains` list. This
would lead to users getting a message that they can't create an account
if they follow the link in the email.

This commit will check the email addresses before the mails are sent and
warn the user typing them in which ones are blocked.

* Add unit test for domain restrictions on invite

* Invite Member: Clear serverError on toggle
---
 webapp/components/invite_member_modal.jsx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'webapp/components/invite_member_modal.jsx')

diff --git a/webapp/components/invite_member_modal.jsx b/webapp/components/invite_member_modal.jsx
index 1e500115d..07aa9a1a3 100644
--- a/webapp/components/invite_member_modal.jsx
+++ b/webapp/components/invite_member_modal.jsx
@@ -97,7 +97,8 @@ class InviteMemberModal extends React.Component {
 
     handleToggle(value) {
         this.setState({
-            show: value
+            show: value,
+            serverError: null
         });
     }
 
-- 
cgit v1.2.3-1-g7c22

