From d09ace15f24c396fb60809185047adee6db1ab08 Mon Sep 17 00:00:00 2001
From: hmhealey <harrisonmhealey@gmail.com>
Date: Thu, 3 Dec 2015 10:31:05 -0500
Subject: Switched ChannelInviteModal to use a ToggleModalButton wherever
 possible

---
 web/react/components/channel_header.jsx | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

(limited to 'web/react/components/channel_header.jsx')

diff --git a/web/react/components/channel_header.jsx b/web/react/components/channel_header.jsx
index 08c4a48ea..ffcb52096 100644
--- a/web/react/components/channel_header.jsx
+++ b/web/react/components/channel_header.jsx
@@ -40,7 +40,6 @@ export default class ChannelHeader extends React.Component {
 
         const state = this.getStateFromStores();
         state.showEditChannelPurposeModal = false;
-        state.showInviteModal = false;
         state.showMembersModal = false;
         this.state = state;
     }
@@ -201,13 +200,12 @@ export default class ChannelHeader extends React.Component {
                         key='add_members'
                         role='presentation'
                     >
-                        <a
+                        <ToggleModalButton
                             role='menuitem'
-                            href='#'
-                            onClick={() => this.setState({showInviteModal: true})}
+                            dialogType={ChannelInviteModal}
                         >
                             {'Add Members'}
-                        </a>
+                        </ToggleModalButton>
                     </li>
                 );
 
@@ -402,10 +400,6 @@ export default class ChannelHeader extends React.Component {
                     onModalDismissed={() => this.setState({showEditChannelPurposeModal: false})}
                     channel={channel}
                 />
-                <ChannelInviteModal
-                    show={this.state.showInviteModal}
-                    onModalDismissed={() => this.setState({showInviteModal: false})}
-                />
                 <ChannelMembersModal
                     show={this.state.showMembersModal}
                     onModalDismissed={() => this.setState({showMembersModal: false})}
-- 
cgit v1.2.3-1-g7c22


From ea80836c6e0acc4fe871024aab04ceba045bdcad Mon Sep 17 00:00:00 2001
From: hmhealey <harrisonmhealey@gmail.com>
Date: Thu, 3 Dec 2015 12:57:34 -0500
Subject: Removed some internal state from ChannelMembersModal and
 ChannelInviteModal

---
 web/react/components/channel_header.jsx | 2 ++
 1 file changed, 2 insertions(+)

(limited to 'web/react/components/channel_header.jsx')

diff --git a/web/react/components/channel_header.jsx b/web/react/components/channel_header.jsx
index ffcb52096..d5a46721e 100644
--- a/web/react/components/channel_header.jsx
+++ b/web/react/components/channel_header.jsx
@@ -203,6 +203,7 @@ export default class ChannelHeader extends React.Component {
                         <ToggleModalButton
                             role='menuitem'
                             dialogType={ChannelInviteModal}
+                            dialogProps={{channel}}
                         >
                             {'Add Members'}
                         </ToggleModalButton>
@@ -403,6 +404,7 @@ export default class ChannelHeader extends React.Component {
                 <ChannelMembersModal
                     show={this.state.showMembersModal}
                     onModalDismissed={() => this.setState({showMembersModal: false})}
+                    channel={channel}
                 />
             </div>
         );
-- 
cgit v1.2.3-1-g7c22

