summaryrefslogtreecommitdiffstats
path: root/webapp/components/backstage/add_outgoing_webhook.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/components/backstage/add_outgoing_webhook.jsx')
-rw-r--r--webapp/components/backstage/add_outgoing_webhook.jsx24
1 files changed, 13 insertions, 11 deletions
diff --git a/webapp/components/backstage/add_outgoing_webhook.jsx b/webapp/components/backstage/add_outgoing_webhook.jsx
index 5d98138df..c2b5e0414 100644
--- a/webapp/components/backstage/add_outgoing_webhook.jsx
+++ b/webapp/components/backstage/add_outgoing_webhook.jsx
@@ -18,14 +18,14 @@ export default class AddOutgoingWebhook 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.updateTriggerWords = this.updateTriggerWords.bind(this);
this.updateCallbackUrls = this.updateCallbackUrls.bind(this);
this.state = {
- name: '',
+ displayName: '',
description: '',
channelId: '',
triggerWords: '',
@@ -80,7 +80,9 @@ export default class AddOutgoingWebhook extends React.Component {
const hook = {
channel_id: this.state.channelId,
trigger_words: this.state.triggerWords.split('\n').map((word) => word.trim()),
- callback_urls: this.state.callbackUrls.split('\n').map((url) => url.trim())
+ callback_urls: this.state.callbackUrls.split('\n').map((url) => url.trim()),
+ display_name: this.state.displayName,
+ description: this.state.description
};
AsyncClient.addOutgoingHook(
@@ -96,9 +98,9 @@ export default class AddOutgoingWebhook extends React.Component {
);
}
- updateName(e) {
+ updateDisplayName(e) {
this.setState({
- name: e.target.value
+ displayName: e.target.value
});
}
@@ -144,20 +146,20 @@ export default class AddOutgoingWebhook extends React.Component {
<div className='form-group'>
<label
className='control-label col-sm-3'
- htmlFor='name'
+ htmlFor='displayName'
>
<FormattedMessage
- id='add_outgoing_webhook.name'
- defaultMessage='Name'
+ id='add_outgoing_webhook.displayName'
+ defaultMessage='Display Name'
/>
</label>
<div className='col-md-5 col-sm-9'>
<input
- id='name'
+ id='displayName'
type='text'
className='form-control'
- value={this.state.name}
- onChange={this.updateName}
+ value={this.state.displayName}
+ onChange={this.updateDisplayName}
/>
</div>
</div>