discourse/app/assets/javascripts/admin/addon/components/permalink-form.hbs
Jarek Radosz 11067c73d0
DEV: Use fn+mut instead of action+mut (#26057)
One step closer to removing all `action` helper usage
2024-03-06 18:05:03 +01:00

38 lines
966 B
Handlebars

<div class="permalink-form">
<div class="inline-form">
<label>{{i18n "admin.permalink.form.label"}}</label>
<TextField
@value={{this.url}}
@disabled={{this.formSubmitted}}
@placeholderKey="admin.permalink.url"
@autocorrect="off"
@autocapitalize="off"
class="permalink-url"
/>
<ComboBox
@content={{this.permalinkTypes}}
@value={{this.permalinkType}}
@onChange={{fn (mut this.permalinkType)}}
class="permalink-type"
/>
<TextField
@value={{this.permalinkTypeValue}}
@disabled={{this.formSubmitted}}
@placeholderKey={{this.permalinkTypePlaceholder}}
@autocorrect="off"
@autocapitalize="off"
@keyDown={{this.submitFormOnEnter}}
class="permalink-destination"
/>
<DButton
@action={{this.onSubmit}}
@disabled={{this.formSubmitted}}
@label="admin.permalink.form.add"
class="permalink-add"
/>
</div>
</div>