mirror of
https://github.com/discourse/discourse.git
synced 2024-12-01 18:26:29 +08:00
c3fd91670e
Re-lands #16119 and #17298 * Update eslint-config-discourse * Update linting workflow * Prettier-ignore stuff * Update template-lint config * Auto-fix template issues * Fix various template issues Mostly incorrect attributes and unused templates * Prettier js files * Fix template auto-fix regressions * Small css tweak Co-authored-by: Peter Wagenet <peter.wagenet@gmail.com>
32 lines
1.7 KiB
Handlebars
32 lines
1.7 KiB
Handlebars
{{#if this.editing}}
|
|
<td class="editing-input">
|
|
<div class="label">{{i18n "admin.embedding.host"}}</div>
|
|
<Input @value={{this.buffered.host}} placeholder="example.com" @enter={{action "save"}} class="host-name" autofocus={{true}} />
|
|
</td>
|
|
<td class="editing-input">
|
|
<div class="label">{{i18n "admin.embedding.class_name"}}</div>
|
|
<Input @value={{this.buffered.class_name}} placeholder="class" @enter={{action "save"}} class="class-name" />
|
|
</td>
|
|
<td class="editing-input">
|
|
<div class="label">{{i18n "admin.embedding.allowed_paths"}}</div>
|
|
<Input @value={{this.buffered.allowed_paths}} placeholder="/blog/.*" @enter={{action "save"}} class="path-allowlist" />
|
|
</td>
|
|
<td class="editing-input">
|
|
<div class="label">{{i18n "admin.embedding.category"}}</div>
|
|
<CategoryChooser @value={{this.categoryId}} @class="small" @onChange={{action (mut this.categoryId)}} />
|
|
</td>
|
|
<td class="editing-controls">
|
|
<DButton @icon="check" @action={{action "save"}} @class="btn-primary" @disabled={{this.cantSave}} />
|
|
<DButton @icon="times" @action={{action "cancel"}} @class="btn-danger" @disabled={{this.host.isSaving}} />
|
|
</td>
|
|
{{else}}
|
|
<td><div class="label">{{i18n "admin.embedding.host"}}</div>{{this.host.host}}</td>
|
|
<td><div class="label">{{i18n "admin.embedding.class_name"}}</div>{{this.host.class_name}}</td>
|
|
<td><div class="label">{{i18n "admin.embedding.allowed_paths"}}</div>{{this.host.allowed_paths}}</td>
|
|
<td><div class="label">{{i18n "admin.embedding.category"}}</div>{{category-badge this.host.category allowUncategorized=true}}</td>
|
|
<td class="controls">
|
|
<DButton @icon="pencil-alt" @action={{action "edit"}} />
|
|
<DButton @icon="far-trash-alt" @action={{action "delete"}} @class="btn-danger" />
|
|
</td>
|
|
{{/if}}
|