summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2015-08-24 15:56:39 -0400
committerJoram Wilander <jwawilander@gmail.com>2015-08-24 15:56:39 -0400
commitc48650843186172fbacdb7df20bd9867b02747ff (patch)
tree84506cfd16b3de7de6669c65a2bd93aad308700b /web
parentd0be2ef930320d2253e9a17cecf518b97cd52be9 (diff)
parent47168a70a17ae55b897185c0bfa2f8c7ac915a0a (diff)
downloadchat-c48650843186172fbacdb7df20bd9867b02747ff.tar.gz
chat-c48650843186172fbacdb7df20bd9867b02747ff.tar.bz2
chat-c48650843186172fbacdb7df20bd9867b02747ff.zip
Merge pull request #446 from rgarmsen2295/mm-1999
MM-1999 Removes 'for' from the edit channel description title when the channel has no title
Diffstat (limited to 'web')
-rw-r--r--web/react/components/edit_channel_modal.jsx7
1 files changed, 6 insertions, 1 deletions
diff --git a/web/react/components/edit_channel_modal.jsx b/web/react/components/edit_channel_modal.jsx
index fc303bbc2..76f0c2c4d 100644
--- a/web/react/components/edit_channel_modal.jsx
+++ b/web/react/components/edit_channel_modal.jsx
@@ -50,13 +50,18 @@ module.exports = React.createClass({
render: function() {
var server_error = this.state.server_error ? <div className='form-group has-error'><br/><label className='control-label'>{ this.state.server_error }</label></div> : null;
+ var editTitle = <h4 className='modal-title' ref='title'>Edit Description</h4>;
+ if (this.state.title) {
+ editTitle = <h4 className='modal-title' ref='title'>Edit Description for <span className='name'>{this.state.title}</span></h4>;
+ }
+
return (
<div className="modal fade" ref="modal" id="edit_channel" role="dialog" tabIndex="-1" aria-hidden="true">
<div className="modal-dialog">
<div className="modal-content">
<div className="modal-header">
<button type="button" className="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
- <h4 className="modal-title" ref="title">Edit Description for <span className='name'>{this.state.title}</span></h4>
+ {editTitle}
</div>
<div className="modal-body">
<textarea className="form-control no-resize" rows="6" ref="channelDesc" maxLength="1024" value={this.state.description} onChange={this.handleUserInput}></textarea>