2016-06-16 01:49:57 +08:00
|
|
|
{{#link-to "adminWebHooks" class="go-back"}}
|
2017-07-27 04:25:09 +08:00
|
|
|
{{d-icon "arrow-left"}}
|
2016-06-16 01:49:57 +08:00
|
|
|
{{i18n "admin.web_hooks.go_back"}}
|
|
|
|
{{/link-to}}
|
|
|
|
|
|
|
|
<div class="web-hook-container">
|
|
|
|
<p>{{i18n "admin.web_hooks.detailed_instruction"}}</p>
|
|
|
|
<form class="web-hook form-horizontal">
|
2021-09-20 21:52:03 +08:00
|
|
|
<div class="control-group">
|
2016-06-16 01:49:57 +08:00
|
|
|
<label for="payload-url">{{i18n "admin.web_hooks.payload_url"}}</label>
|
|
|
|
{{text-field name="payload-url" value=model.payload_url placeholderKey="admin.web_hooks.payload_url_placeholder"}}
|
|
|
|
{{input-tip validation=urlValidation}}
|
|
|
|
</div>
|
|
|
|
|
2021-09-20 21:52:03 +08:00
|
|
|
<div class="control-group">
|
2016-06-16 01:49:57 +08:00
|
|
|
<label for="content-type">{{i18n "admin.web_hooks.content_type"}}</label>
|
2020-02-03 21:22:14 +08:00
|
|
|
{{combo-box
|
|
|
|
content=contentTypes
|
|
|
|
name="content-type"
|
|
|
|
value=model.content_type
|
2020-10-07 05:50:05 +08:00
|
|
|
onChange=(action (mut model.content_type))
|
2020-02-03 21:22:14 +08:00
|
|
|
}}
|
2016-06-16 01:49:57 +08:00
|
|
|
</div>
|
|
|
|
|
2021-09-20 21:52:03 +08:00
|
|
|
<div class="control-group">
|
2016-06-16 01:49:57 +08:00
|
|
|
<label for="secret">{{i18n "admin.web_hooks.secret"}}</label>
|
|
|
|
{{text-field name="secret" value=model.secret placeholderKey="admin.web_hooks.secret_placeholder"}}
|
|
|
|
{{input-tip validation=secretValidation}}
|
|
|
|
</div>
|
|
|
|
|
2021-09-20 21:52:03 +08:00
|
|
|
<div class="control-group">
|
2016-06-16 01:49:57 +08:00
|
|
|
<label>{{i18n "admin.web_hooks.event_chooser"}}</label>
|
|
|
|
<div>
|
|
|
|
{{radio-button class="subscription-choice" name="subscription-choice" value="individual" selection=model.webHookType}}
|
|
|
|
{{i18n "admin.web_hooks.individual_event"}}
|
|
|
|
{{input-tip validation=eventTypeValidation}}
|
|
|
|
</div>
|
|
|
|
{{#unless model.wildcard_web_hook}}
|
|
|
|
<div class="event-selector">
|
|
|
|
{{#each eventTypes as |type|}}
|
|
|
|
{{admin-web-hook-event-chooser type=type model=model.web_hook_event_types}}
|
|
|
|
{{/each}}
|
|
|
|
</div>
|
|
|
|
{{/unless}}
|
|
|
|
<div>
|
|
|
|
{{radio-button class="subscription-choice" name="subscription-choice" value="wildcard" selection=model.webHookType}}
|
|
|
|
{{i18n "admin.web_hooks.wildcard_event"}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2021-09-20 21:52:03 +08:00
|
|
|
<div class="filters control-group">
|
2018-07-03 11:14:53 +08:00
|
|
|
<div class="filter">
|
2017-07-27 04:25:09 +08:00
|
|
|
<label>{{d-icon "circle" class="tracking"}}{{i18n "admin.web_hooks.categories_filter"}}</label>
|
2020-02-03 21:22:14 +08:00
|
|
|
{{category-selector
|
|
|
|
categories=model.categories
|
2020-10-07 05:50:05 +08:00
|
|
|
onChange=(action (mut model.categories))
|
2020-02-03 21:22:14 +08:00
|
|
|
}}
|
2016-06-16 01:49:57 +08:00
|
|
|
<div class="instructions">{{i18n "admin.web_hooks.categories_filter_instructions"}}</div>
|
|
|
|
</div>
|
2018-12-05 17:14:06 +08:00
|
|
|
{{#if showTagsFilter}}
|
|
|
|
<div class="filter">
|
|
|
|
<label>{{d-icon "circle" class="tracking"}}{{i18n "admin.web_hooks.tags_filter"}}</label>
|
2019-12-05 02:33:51 +08:00
|
|
|
{{tag-chooser tags=model.tag_names everyTag=true excludeSynonyms=true}}
|
2018-12-05 17:14:06 +08:00
|
|
|
<div class="instructions">{{i18n "admin.web_hooks.tags_filter_instructions"}}</div>
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
2018-07-03 11:14:53 +08:00
|
|
|
<div class="filter">
|
2017-07-27 04:25:09 +08:00
|
|
|
<label>{{d-icon "circle" class="tracking"}}{{i18n "admin.web_hooks.groups_filter"}}</label>
|
2016-06-16 01:49:57 +08:00
|
|
|
{{group-selector groupNames=model.groupsFilterInName groupFinder=model.groupFinder}}
|
|
|
|
<div class="instructions">{{i18n "admin.web_hooks.groups_filter_instructions"}}</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2016-12-23 00:08:35 +08:00
|
|
|
{{plugin-outlet name="web-hook-fields" args=(hash model=model)}}
|
|
|
|
|
2016-06-16 01:49:57 +08:00
|
|
|
<div>
|
|
|
|
{{input type="checkbox" name="verify_certificate" checked=model.verify_certificate}} {{i18n "admin.web_hooks.verify_certificate"}}
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
{{input type="checkbox" name="active" checked=model.active}} {{i18n "admin.web_hooks.active"}}
|
|
|
|
</div>
|
|
|
|
{{#if model.active}}
|
|
|
|
<div class="instructions">{{i18n "admin.web_hooks.active_notice"}}</div>
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
<div class="controls">
|
2019-01-10 18:06:01 +08:00
|
|
|
{{d-button class="btn-default" translatedLabel=saveButtonText action=(action "save") disabled=saveButtonDisabled}}
|
|
|
|
|
2016-06-16 01:49:57 +08:00
|
|
|
{{#unless model.isNew}}
|
2019-01-10 18:06:01 +08:00
|
|
|
{{d-button class="btn-danger" label="admin.web_hooks.destroy" action=(action "destroy")}}
|
2016-06-16 01:49:57 +08:00
|
|
|
{{#link-to "adminWebHooks.showEvents" model.id class="btn"}}
|
|
|
|
{{i18n "admin.web_hooks.events.go_events"}}
|
|
|
|
{{/link-to}}
|
|
|
|
{{/unless}}
|
|
|
|
<span class="saving">{{savingStatus}}</span>
|
|
|
|
</div>
|
|
|
|
</div>
|