discourse/app/assets/javascripts/admin/addon/templates/user-fields.hbs
Ted Johansson 408de686bb
DEV: Convert admin user fields to FormKit (#29070)
This change replaces the admin form for adding and editing custom user fields with a new FormKit implementation.
2024-10-14 13:19:53 +08:00

29 lines
790 B
Handlebars

<div class="admin-config-page__main-area">
<div class="user-fields">
<h2>{{i18n "admin.user_fields.title"}}</h2>
<p class="desc">{{i18n "admin.user_fields.help"}}</p>
{{#if this.model}}
{{#each this.sortedFields as |uf|}}
<AdminUserFieldItem
@userField={{uf}}
@fieldTypes={{this.fieldTypes}}
@firstField={{this.firstField}}
@lastField={{this.lastField}}
@destroyAction={{this.destroyField}}
@moveUpAction={{this.moveUp}}
@moveDownAction={{this.moveDown}}
/>
{{/each}}
{{/if}}
<DButton
@disabled={{this.createDisabled}}
@action={{this.createField}}
@label="admin.user_fields.create"
@icon="plus"
class="btn-primary"
/>
</div>
</div>