mirror of
https://github.com/discourse/discourse.git
synced 2024-11-30 05:53:55 +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
26 lines
653 B
Handlebars
26 lines
653 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 {{on "click" this.edit}} class="inline-editable-field">
|
|
<span>{{this.value}}</span>
|
|
</a>
|
|
{{/if}}
|
|
</div>
|
|
<div class="controls">
|
|
{{#if this.editing}}
|
|
<DButton
|
|
class="btn-default"
|
|
@action={{this.save}}
|
|
@label="admin.user_fields.save"
|
|
/>
|
|
<a href {{on "click" this.edit}}>{{i18n "cancel"}}</a>
|
|
{{else}}
|
|
<DButton class="btn-default" @action={{this.edit}} @icon="pencil-alt" />
|
|
{{/if}}
|
|
</div> |