diff options
author | hmhealey <harrisonmhealey@gmail.com> | 2015-11-16 12:08:05 -0500 |
---|---|---|
committer | hmhealey <harrisonmhealey@gmail.com> | 2015-11-23 10:53:06 -0500 |
commit | 6237631a85b79311a60b87df423abbdce56c7876 (patch) | |
tree | 2fe385ee6258be1d9f83cc737fd51651359ff48c /web/react/utils/channel_intro_mssages.jsx | |
parent | 60e2314baaa17fe972f13e6f763e08e03e356c8a (diff) | |
download | chat-6237631a85b79311a60b87df423abbdce56c7876.tar.gz chat-6237631a85b79311a60b87df423abbdce56c7876.tar.bz2 chat-6237631a85b79311a60b87df423abbdce56c7876.zip |
Ported EditChannelModal to React-Bootstrap
Diffstat (limited to 'web/react/utils/channel_intro_mssages.jsx')
-rw-r--r-- | web/react/utils/channel_intro_mssages.jsx | 51 |
1 files changed, 18 insertions, 33 deletions
diff --git a/web/react/utils/channel_intro_mssages.jsx b/web/react/utils/channel_intro_mssages.jsx index 0bbc7366e..4047ec028 100644 --- a/web/react/utils/channel_intro_mssages.jsx +++ b/web/react/utils/channel_intro_mssages.jsx @@ -1,9 +1,10 @@ - // Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. // See License.txt for license information. import * as Utils from './utils.jsx'; +import EditChannelModal from '../components/edit_channel_modal.jsx'; import InviteMemberModal from '../components/invite_member_modal.jsx'; +import ToggleModalButton from '../components/toggle_modal_button.jsx'; import UserProfile from '../components/user_profile.jsx'; import ChannelStore from '../stores/channel_store.jsx'; import Constants from '../utils/constants.jsx'; @@ -49,17 +50,13 @@ export function createDMIntroMessage(channel) { {'This is the start of your direct message history with ' + teammateName + '.'}<br/> {'Direct messages and files shared here are not shown to people outside this area.'} </p> - <a + <ToggleModalButton className='intro-links' - href='#' - data-toggle='modal' - data-target='#edit_channel' - data-header={channel.header} - data-title={channel.display_name} - data-channelid={channel.id} + dialogType={EditChannelModal} + dialogProps={{channel}} > <i className='fa fa-pencil'></i>{'Set a header'} - </a> + </ToggleModalButton> </div> ); } @@ -79,17 +76,13 @@ export function createOffTopicIntroMessage(channel, showInviteModal) { {'This is the start of ' + channel.display_name + ', a channel for non-work-related conversations.'} <br/> </p> - <a + <ToggleModalButton className='intro-links' - href='#' - data-toggle='modal' - data-target='#edit_channel' - data-header={channel.header} - data-title={channel.display_name} - data-channelid={channel.id} + dialogType={EditChannelModal} + dialogProps={{channel}} > <i className='fa fa-pencil'></i>{'Set a header'} - </a> + </ToggleModalButton> <a href='#' className='intro-links' @@ -138,17 +131,13 @@ export function createDefaultIntroMessage(channel) { {'This is the first channel teammates see when they sign up - use it for posting updates everyone needs to know.'} </p> {inviteModalLink} - <a + <ToggleModalButton className='intro-links' - href='#' - data-toggle='modal' - data-target='#edit_channel' - data-header={channel.header} - data-title={channel.display_name} - data-channelid={channel.id} + dialogType={EditChannelModal} + dialogProps={{channel}} > <i className='fa fa-pencil'></i>{'Set a header'} - </a> + </ToggleModalButton> <br/> </div> ); @@ -193,17 +182,13 @@ export function createStandardIntroMessage(channel, showInviteModal) { {memberMessage} <br/> </p> - <a + <ToggleModalButton className='intro-links' - href='#' - data-toggle='modal' - data-target='#edit_channel' - data-header={channel.header} - data-title={channel.display_name} - data-channelid={channel.id} + dialogType={EditChannelModal} + dialogProps={{channel}} > <i className='fa fa-pencil'></i>{'Set a header'} - </a> + </ToggleModalButton> <a className='intro-links' href='#' |