summaryrefslogtreecommitdiffstats
path: root/web/react/components/get_team_invite_link_modal.jsx
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2015-11-23 10:22:55 -0800
committerCorey Hulen <corey@hulen.com>2015-11-23 10:22:55 -0800
commitd42a567bab3cd306caf0a42bed804c26222a46da (patch)
tree3099b4d08323315985c547367349fc337971cbbe /web/react/components/get_team_invite_link_modal.jsx
parentc03a9859838e3492b50e71383587b98231408b7b (diff)
parent388dc6c89c62133c3c5fd1c3bb5ec0327cf5be6d (diff)
downloadchat-d42a567bab3cd306caf0a42bed804c26222a46da.tar.gz
chat-d42a567bab3cd306caf0a42bed804c26222a46da.tar.bz2
chat-d42a567bab3cd306caf0a42bed804c26222a46da.zip
Merge pull request #1485 from hmhealey/plt1151
PLT-1151 Refactor more modals to React-Bootstrap
Diffstat (limited to 'web/react/components/get_team_invite_link_modal.jsx')
-rw-r--r--web/react/components/get_team_invite_link_modal.jsx45
1 files changed, 45 insertions, 0 deletions
diff --git a/web/react/components/get_team_invite_link_modal.jsx b/web/react/components/get_team_invite_link_modal.jsx
new file mode 100644
index 000000000..a926c4451
--- /dev/null
+++ b/web/react/components/get_team_invite_link_modal.jsx
@@ -0,0 +1,45 @@
+// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved.
+// See License.txt for license information.
+
+import Constants from '../utils/constants.jsx';
+import GetLinkModal from './get_link_modal.jsx';
+import ModalStore from '../stores/modal_store.jsx';
+import TeamStore from '../stores/team_store.jsx';
+
+export default class GetTeamInviteLinkModal extends React.Component {
+ constructor(props) {
+ super(props);
+
+ this.handleToggle = this.handleToggle.bind(this);
+
+ this.state = {
+ show: false
+ };
+ }
+
+ componentDidMount() {
+ ModalStore.addModalListener(Constants.ActionTypes.TOGGLE_GET_TEAM_INVITE_LINK_MODAL, this.handleToggle);
+ }
+
+ componentWillUnmount() {
+ ModalStore.removeModalListener(Constants.ActionTypes.TOGGLE_GET_TEAM_INVITE_LINK_MODAL, this.handleToggle);
+ }
+
+ handleToggle(value) {
+ this.setState({
+ show: value
+ });
+ }
+
+ render() {
+ return (
+ <GetLinkModal
+ show={this.state.show}
+ onHide={() => this.setState({show: false})}
+ title='Team Invite Link'
+ helpText='Send teammates the link below for them to sign-up to this team site.'
+ link={TeamStore.getCurrentInviteLink()}
+ />
+ );
+ }
+}