diff options
Diffstat (limited to 'webapp/components/backstage/add_incoming_webhook.jsx')
-rw-r--r-- | webapp/components/backstage/add_incoming_webhook.jsx | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/webapp/components/backstage/add_incoming_webhook.jsx b/webapp/components/backstage/add_incoming_webhook.jsx index 83027c6b3..f3601cb07 100644 --- a/webapp/components/backstage/add_incoming_webhook.jsx +++ b/webapp/components/backstage/add_incoming_webhook.jsx @@ -18,12 +18,12 @@ export default class AddIncomingWebhook extends React.Component { this.handleSubmit = this.handleSubmit.bind(this); - this.updateName = this.updateName.bind(this); + this.updateDisplayName = this.updateDisplayName.bind(this); this.updateDescription = this.updateDescription.bind(this); this.updateChannelId = this.updateChannelId.bind(this); this.state = { - name: '', + displayName: '', description: '', channelId: '', saving: false, @@ -60,7 +60,9 @@ export default class AddIncomingWebhook extends React.Component { } const hook = { - channel_id: this.state.channelId + channel_id: this.state.channelId, + display_name: this.state.displayName, + description: this.state.description }; AsyncClient.addIncomingHook( @@ -70,15 +72,16 @@ export default class AddIncomingWebhook extends React.Component { }, (err) => { this.setState({ + saving: false, serverError: err.message }); } ); } - updateName(e) { + updateDisplayName(e) { this.setState({ - name: e.target.value + displayName: e.target.value }); } @@ -112,20 +115,21 @@ export default class AddIncomingWebhook extends React.Component { <div className='form-group'> <label className='control-label col-sm-3' - htmlFor='name' + htmlFor='displayName' > <FormattedMessage - id='add_incoming_webhook.name' - defaultMessage='Name' + id='add_incoming_webhook.displayName' + defaultMessage='Display Name' /> </label> <div className='col-md-5 col-sm-9'> <input - id='name' + id='displayName' type='text' + maxLength='64' className='form-control' - value={this.state.name} - onChange={this.updateName} + value={this.state.displayName} + onChange={this.updateDisplayName} /> </div> </div> @@ -143,6 +147,7 @@ export default class AddIncomingWebhook extends React.Component { <input id='description' type='text' + maxLength='128' className='form-control' value={this.state.description} onChange={this.updateDescription} |