discourse/app/assets/javascripts/admin/addon/templates/components/admin-editable-field.hbs
David Taylor 585c584fdb
Revert "DEV: Remove usage of {{action}} modifiers (#18333)" (#18469)
This reverts commit ba27ee1637.

We found some issues with handling of cmd/ctrl/shift + click on `<a` elements
2022-10-04 12:27:26 +01:00

19 lines
606 B
Handlebars

<div class="field">{{i18n this.name}}</div>
<div class="value">
{{#if this.editing}}
<TextField @value={{this.buffer}} @autofocus="autofocus" @autocomplete="off" />
{{else}}
<a href {{action "edit"}} class="inline-editable-field">
<span>{{this.value}}</span>
</a>
{{/if}}
</div>
<div class="controls">
{{#if this.editing}}
<DButton @class="btn-default" @action={{action "save"}} @label="admin.user_fields.save" />
<a href {{action "edit"}}>{{i18n "cancel"}}</a>
{{else}}
<DButton @class="btn-default" @action={{action "edit"}} @icon="pencil-alt" />
{{/if}}
</div>