mirror of
https://github.com/discourse/discourse.git
synced 2024-12-11 21:44:08 +08:00
1c87bb7fe9
1. Use `this.` instead of `{{action}}` where applicable 2. Use `{{fn}}` instead of `@actionParam` where applicable 3. Use non-`@` versions of class/type/tabindex/aria-controls/aria-expanded 4. Remove `btn` class (it's added automatically to all DButtons) 5. Remove `type="button"` (it's the default) 6. Use `concat-class` helper
62 lines
1.6 KiB
Handlebars
62 lines
1.6 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.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={{this.save}}
|
|
@disabled={{this.cantSave}}
|
|
class="btn-primary"
|
|
/>
|
|
<DButton
|
|
@icon="times"
|
|
@action={{this.cancel}}
|
|
@disabled={{this.host.isSaving}}
|
|
class="btn-danger"
|
|
/>
|
|
</td>
|
|
{{else}}
|
|
<td>
|
|
<div class="label">{{i18n "admin.embedding.host"}}</div>
|
|
{{this.host.host}}
|
|
</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={{this.edit}} />
|
|
<DButton @icon="far-trash-alt" @action={{this.delete}} class="btn-danger" />
|
|
</td>
|
|
{{/if}} |