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

107 lines
3.8 KiB
Handlebars

{{#d-modal-body id="chat_integration_edit_rule_modal" title="chat_integration.edit_rule_modal.title"}}
<div>
<form {{action "save" on="submit"}}>
<table>
<tr class="input">
<td class="label"><label for='provider'>{{i18n "chat_integration.edit_rule_modal.provider"}}</label></td>
<td>
{{i18n (concat 'chat_integration.provider.' model.channel.provider '.title')}}
</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>
<td>
{{combo-box name="type" content=model.rule.available_types value=model.rule.type}}
</td>
</tr>
<tr class="instructions">
<td></td>
<td><label>{{i18n 'chat_integration.edit_rule_modal.instructions.type'}}</label></td>
</tr>
<tr class="input">
<td class="label"><label for='filter'>{{i18n "chat_integration.edit_rule_modal.filter"}}</label></td>
<td>
{{combo-box name="filter" content=model.rule.available_filters value=model.rule.filter}}
</td>
</tr>
<tr class="instructions">
<td></td>
<td><label>{{i18n 'chat_integration.edit_rule_modal.instructions.filter'}}</label></td>
</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
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}}
{{#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}}
</td>
</tr>
<tr class="instructions">
<td></td>
<td><label>{{i18n 'chat_integration.edit_rule_modal.instructions.tags'}}</label></td>
</tr>
{{/if}}
</table>
</form>
</div>
{{/d-modal-body}}
<div class="modal-footer">
{{d-button id="save_rule" class='btn-primary btn-large' action="save" title="chat_integration.edit_rule_modal.save" label="chat_integration.edit_rule_modal.save" disabled=saveDisabled}}
{{d-button class="btn-large" action="cancel" title="chat_integration.edit_rule_modal.cancel" label="chat_integration.edit_rule_modal.cancel"}}
</div>