mirror of
https://github.com/discourse/discourse.git
synced 2024-12-02 05:03:40 +08:00
a914d3230b
Followup to 7d8974d02f
Co-authored-by: David Taylor <david@taylorhq.com>
87 lines
2.2 KiB
Handlebars
87 lines
2.2 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={{this.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={{this.save}}
|
|
class="path-allowlist"
|
|
/>
|
|
</td>
|
|
<td class="editing-input">
|
|
<div class="label">{{i18n "admin.embedding.category"}}</div>
|
|
<CategoryChooser
|
|
@value={{this.category.id}}
|
|
@onChangeCategory={{fn (mut this.category)}}
|
|
class="small"
|
|
/>
|
|
</td>
|
|
<td class="editing-input">
|
|
<div class="label">{{i18n "admin.embedding.tags"}}</div>
|
|
<TagChooser
|
|
@tags={{this.tags}}
|
|
@everyTag={{true}}
|
|
@excludeSynonyms={{true}}
|
|
@unlimitedTagCount={{true}}
|
|
@onChange={{fn (mut this.tags)}}
|
|
@options={{hash filterPlaceholder="category.tags_placeholder"}}
|
|
/>
|
|
</td>
|
|
<td class="editing-input">
|
|
<div class="label">{{i18n "admin.embedding.user"}}</div>
|
|
<UserChooser
|
|
@value={{this.user}}
|
|
@onChange={{action "onUserChange"}}
|
|
@options={{hash maximum=1 excludeCurrentUser=false}}
|
|
/>
|
|
</td>
|
|
<td class="editing-controls">
|
|
<DButton
|
|
@icon="check"
|
|
@action={{this.save}}
|
|
@disabled={{this.cantSave}}
|
|
class="btn-primary"
|
|
/>
|
|
<DButton
|
|
@icon="xmark"
|
|
@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.category allowUncategorized=true}}
|
|
</td>
|
|
<td>
|
|
{{this.tags}}
|
|
</td>
|
|
<td>
|
|
{{this.user}}
|
|
</td>
|
|
<td class="controls">
|
|
<DButton @icon="pencil" @action={{this.edit}} />
|
|
<DButton @icon="trash-can" @action={{this.delete}} class="btn-danger" />
|
|
</td>
|
|
{{/if}} |