discourse-chat-integration/assets/javascripts/admin/templates/modal/admin-plugins-chat-edit-rul...

112 lines
3.9 KiB
Handlebars
Raw Normal View History

{{#d-modal-body id="chat-integration-edit-rule_modal" title="chat_integration.edit_rule_modal.title"}}
2017-07-31 12:09:21 -04:00
<div>
<form {{action "save" on="submit"}}>
<table>
2017-10-03 05:42:07 -04:00
<tr class="input">
2017-07-31 12:09:21 -04:00
<td class="label"><label for='provider'>{{i18n "chat_integration.edit_rule_modal.provider"}}</label></td>
<td>
2017-10-03 05:42:07 -04:00
{{i18n (concat 'chat_integration.provider.' model.channel.provider '.title')}}
2017-07-31 12:09:21 -04:00
</td>
</tr>
<tr class="instructions">
<td></td>
<td></td>
</tr>
<tr class="input">
<td class="label"><label for='channel'>{{i18n "chat_integration.edit_rule_modal.channel"}}</label></td>
<td>
{{channel-data provider=model.provider channel=model.channel}}
</td>
</tr>
<tr class="instructions">
<td></td>
<td></td>
</tr>
<tr class="input">
<td class="label"><label for='filter'>{{i18n "chat_integration.edit_rule_modal.type"}}</label></td>
2017-07-31 12:09:21 -04:00
<td>
{{combo-box name="type" content=model.rule.available_types value=model.rule.type}}
2017-07-31 12:09:21 -04:00
</td>
</tr>
<tr class="instructions">
<td></td>
<td><label>{{i18n 'chat_integration.edit_rule_modal.instructions.type'}}</label></td>
2017-07-31 12:09:21 -04:00
</tr>
<tr class="input">
<td class="label"><label for='filter'>{{i18n "chat_integration.edit_rule_modal.filter"}}</label></td>
2017-07-31 12:09:21 -04:00
<td>
{{combo-box name="filter" content=model.rule.available_filters value=model.rule.filter}}
2017-07-31 12:09:21 -04:00
</td>
</tr>
<tr class="instructions">
<td></td>
<td><label>{{i18n 'chat_integration.edit_rule_modal.instructions.filter'}}</label></td>
2017-07-31 12:09:21 -04:00
</tr>
{{#if showCategory}}
<tr class="input">
<td class="label"><label for='category'>{{i18n "chat_integration.edit_rule_modal.category"}}</label></td>
<td>
{{category-chooser
name="category"
value=model.rule.category_id
rootNoneLabel="chat_integration.all_categories"
rootNone=true
2017-10-03 06:11:58 -04:00
overrideWidths=false}}
</td>
</tr>
<tr class="instructions">
<td></td>
<td><label>{{i18n 'chat_integration.edit_rule_modal.instructions.category'}}</label></td>
</tr>
{{else}}
<tr class="input">
<td class="label"><label for='group'>{{i18n "chat_integration.edit_rule_modal.group"}}</label></td>
<td>
{{combo-box content=model.groups valueAttribute="id" value=model.rule.group_id none="chat_integration.choose_group"}}
</td>
</tr>
<tr class="instructions">
<td></td>
<td><label>{{i18n 'chat_integration.edit_rule_modal.instructions.group'}}</label></td>
</tr>
{{/if}}
2017-07-31 12:09:21 -04:00
{{#if siteSettings.tagging_enabled}}
<tr class="input">
<td class="label"><label for='tags'>{{i18n "chat_integration.edit_rule_modal.tags"}}</label></td>
<td>
{{tag-chooser placeholderKey="chat_integration.all_tags" name="tags" tags=model.rule.tags everyTag=true }}
2017-07-31 12:09:21 -04:00
</td>
</tr>
<tr class="instructions">
<td></td>
<td><label>{{i18n 'chat_integration.edit_rule_modal.instructions.tags'}}</label></td>
</tr>
{{/if}}
</table>
</form>
2017-10-03 05:42:07 -04:00
</div>
2017-07-31 12:09:21 -04:00
{{/d-modal-body}}
<div class="modal-footer">
2017-10-03 05:42:07 -04:00
{{d-button id="save-rule"
class='btn-primary btn-large'
action="save"
actionParam=model.rule
title="chat_integration.edit_rule_modal.save"
label="chat_integration.edit_rule_modal.save"
disabled=saveDisabled}}
2017-07-31 12:09:21 -04:00
2017-10-03 05:42:07 -04:00
{{d-button class="btn-large"
action=(route-action "closeModal")
2017-10-03 05:42:07 -04:00
title="chat_integration.edit_rule_modal.cancel"
label="chat_integration.edit_rule_modal.cancel"}}
</div>