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

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

17 lines
519 B
Handlebars
Raw Normal View History

<div class='field'>{{i18n name}}</div>
<div class='value'>
{{#if editing}}
{{text-field value=buffer autofocus="autofocus" autocomplete="discourse"}}
{{else}}
<span {{action "edit"}}>{{value}}</span>
{{/if}}
</div>
<div class='controls'>
{{#if editing}}
{{d-button class="btn-default" action=(action "save") label="admin.user_fields.save"}}
<a href {{action "edit"}}>{{i18n 'cancel'}}</a>
{{else}}
2019-01-22 06:02:02 -05:00
{{d-button class="btn-default" action=(action "edit") icon="pencil-alt"}}
{{/if}}
</div>