discourse/app/assets/javascripts/admin/addon/templates/components/admin-editable-field.hbs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
581 B
Handlebars
Raw Normal View History

<div class="field">{{i18n name}}</div>
<div class="value">
{{#if editing}}
<TextField @value={{buffer}} @autofocus="autofocus" @autocomplete="off" />
{{else}}
<a href {{action "edit"}} class="inline-editable-field">
<span>{{value}}</span>
</a>
{{/if}}
</div>
<div class="controls">
{{#if 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>