From 0b200cc9245193aa01b00ecc8bf41483f6b32e7e Mon Sep 17 00:00:00 2001 From: David Lu Date: Thu, 14 Jul 2016 15:56:49 -0400 Subject: PLT-3266 Added channel header to create channel modal (#3559) * Added channel header to create channel modal removed React FindDOMNode * made css changes --- webapp/components/new_channel_flow.jsx | 6 ++++- webapp/components/new_channel_modal.jsx | 44 ++++++++++++++++++++++++++++++--- webapp/i18n/en.json | 2 ++ 3 files changed, 48 insertions(+), 4 deletions(-) (limited to 'webapp') diff --git a/webapp/components/new_channel_flow.jsx b/webapp/components/new_channel_flow.jsx index db06cf0be..f6e91afc4 100644 --- a/webapp/components/new_channel_flow.jsx +++ b/webapp/components/new_channel_flow.jsx @@ -65,6 +65,7 @@ class NewChannelFlow extends React.Component { channelDisplayName: '', channelName: '', channelPurpose: '', + channelHeader: '', nameModified: false }; } @@ -78,6 +79,7 @@ class NewChannelFlow extends React.Component { channelDisplayName: '', channelName: '', channelPurpose: '', + channelHeader: '', nameModified: false }); } @@ -99,6 +101,7 @@ class NewChannelFlow extends React.Component { name: this.state.channelName, display_name: this.state.channelDisplayName, purpose: this.state.channelPurpose, + header: this.state.channelHeader, type: this.state.channelType }; Client.createChannel( @@ -153,7 +156,8 @@ class NewChannelFlow extends React.Component { channelDataChanged(data) { this.setState({ channelDisplayName: data.displayName, - channelPurpose: data.purpose + channelPurpose: data.purpose, + channelHeader: data.header }); if (!this.state.nameModified) { this.setState({channelName: Utils.cleanUpUrlable(data.displayName.trim())}); diff --git a/webapp/components/new_channel_modal.jsx b/webapp/components/new_channel_modal.jsx index 23eee625d..1198335ca 100644 --- a/webapp/components/new_channel_modal.jsx +++ b/webapp/components/new_channel_modal.jsx @@ -89,8 +89,9 @@ class NewChannelModal extends React.Component { handleChange() { const newData = { - displayName: ReactDOM.findDOMNode(this.refs.display_name).value, - purpose: ReactDOM.findDOMNode(this.refs.channel_purpose).value + displayName: this.refs.display_name.value, + header: this.refs.channel_header.value, + purpose: this.refs.channel_purpose.value }; this.props.onDataChanged(newData); } @@ -258,7 +259,7 @@ class NewChannelModal extends React.Component {

-
+
+
+
+
+ + +
+
+