summaryrefslogtreecommitdiffstats
path: root/web/react/components/invite_member_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/invite_member_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/invite_member_modal.jsx')
-rw-r--r--web/react/components/invite_member_modal.jsx36
1 files changed, 16 insertions, 20 deletions
diff --git a/web/react/components/invite_member_modal.jsx b/web/react/components/invite_member_modal.jsx
index 7df75252e..76f52faa9 100644
--- a/web/react/components/invite_member_modal.jsx
+++ b/web/react/components/invite_member_modal.jsx
@@ -4,8 +4,8 @@
import * as utils from '../utils/utils.jsx';
import Constants from '../utils/constants.jsx';
const ActionTypes = Constants.ActionTypes;
-import AppDispatcher from '../dispatcher/app_dispatcher.jsx';
import * as Client from '../utils/client.jsx';
+import * as EventHelpers from '../dispatcher/event_helpers.jsx';
import ModalStore from '../stores/modal_store.jsx';
import UserStore from '../stores/user_store.jsx';
import TeamStore from '../stores/team_store.jsx';
@@ -23,6 +23,7 @@ export default class InviteMemberModal extends React.Component {
this.addInviteFields = this.addInviteFields.bind(this);
this.clearFields = this.clearFields.bind(this);
this.removeInviteFields = this.removeInviteFields.bind(this);
+ this.showGetTeamInviteLinkModal = this.showGetTeamInviteLinkModal.bind(this);
this.state = {
show: false,
@@ -188,6 +189,12 @@ export default class InviteMemberModal extends React.Component {
this.setState({inviteIds: inviteIds, idCount: count});
}
+ showGetTeamInviteLinkModal() {
+ this.handleHide(false);
+
+ EventHelpers.showGetTeamInviteLinkModal();
+ }
+
render() {
var currentUser = UserStore.getCurrentUser();
@@ -333,22 +340,18 @@ export default class InviteMemberModal extends React.Component {
} else {
var teamInviteLink = null;
if (currentUser && TeamStore.getCurrent().type === 'O') {
- var linkUrl = utils.getWindowLocationOrigin() + '/signup_user_complete/?id=' + TeamStore.getCurrent().invite_id;
- var link =
- (
- <a
- href='#'
- data-toggle='modal'
- data-target='#get_link'
- data-title='Team Invite'
- data-value={linkUrl}
- onClick={() => this.handleHide(this, false)}
- >Team Invite Link</a>
+ var link = (
+ <a
+ href='#'
+ onClick={this.showGetTeamInviteLinkModal}
+ >
+ {'Team Invite Link'}
+ </a>
);
teamInviteLink = (
<p>
- You can also invite people using the {link}.
+ {'You can also invite people using the '}{link}{'.'}
</p>
);
}
@@ -405,13 +408,6 @@ export default class InviteMemberModal extends React.Component {
return null;
}
-
- static show() {
- AppDispatcher.handleViewAction({
- type: ActionTypes.TOGGLE_INVITE_MEMBER_MODAL,
- value: true
- });
- }
}
InviteMemberModal.propTypes = {