2015-07-11 00:28:56 +08:00
|
|
|
{{#if editing}}
|
2015-07-28 02:22:12 +08:00
|
|
|
{{#admin-form-row label="admin.user_fields.type"}}
|
2020-02-03 21:22:14 +08:00
|
|
|
{{combo-box
|
|
|
|
content=fieldTypes
|
|
|
|
value=buffered.field_type
|
2020-10-06 23:17:45 +08:00
|
|
|
onChange=(fn (mut buffered.field_type))
|
2020-02-03 21:22:14 +08:00
|
|
|
}}
|
2015-07-28 02:22:12 +08:00
|
|
|
{{/admin-form-row}}
|
|
|
|
|
|
|
|
{{#admin-form-row label="admin.user_fields.name"}}
|
2018-01-30 19:34:18 +08:00
|
|
|
{{input value=buffered.name class="user-field-name" maxlength="255"}}
|
2015-07-28 02:22:12 +08:00
|
|
|
{{/admin-form-row}}
|
|
|
|
|
|
|
|
{{#admin-form-row label="admin.user_fields.description"}}
|
2018-01-30 19:34:18 +08:00
|
|
|
{{input value=buffered.description class="user-field-desc" maxlength="255"}}
|
2015-07-28 02:22:12 +08:00
|
|
|
{{/admin-form-row}}
|
|
|
|
|
2015-07-29 00:29:40 +08:00
|
|
|
{{#if bufferedFieldType.hasOptions}}
|
|
|
|
{{#admin-form-row label="admin.user_fields.options"}}
|
|
|
|
{{value-list values=buffered.options inputType="array"}}
|
|
|
|
{{/admin-form-row}}
|
|
|
|
{{/if}}
|
|
|
|
|
2015-07-28 02:22:12 +08:00
|
|
|
{{#admin-form-row wrapLabel="true"}}
|
2019-02-19 16:30:38 +08:00
|
|
|
{{input type="checkbox" checked=buffered.editable}} {{i18n "admin.user_fields.editable.title"}}
|
2015-07-28 02:22:12 +08:00
|
|
|
{{/admin-form-row}}
|
|
|
|
|
|
|
|
{{#admin-form-row wrapLabel="true"}}
|
2019-02-19 16:30:38 +08:00
|
|
|
{{input type="checkbox" checked=buffered.required}} {{i18n "admin.user_fields.required.title"}}
|
2015-07-28 02:22:12 +08:00
|
|
|
{{/admin-form-row}}
|
|
|
|
|
|
|
|
{{#admin-form-row wrapLabel="true"}}
|
2019-02-19 16:30:38 +08:00
|
|
|
{{input type="checkbox" checked=buffered.show_on_profile}} {{i18n "admin.user_fields.show_on_profile.title"}}
|
2015-07-28 02:22:12 +08:00
|
|
|
{{/admin-form-row}}
|
|
|
|
|
2016-04-08 20:35:41 +08:00
|
|
|
{{#admin-form-row wrapLabel="true"}}
|
2019-02-19 16:30:38 +08:00
|
|
|
{{input type="checkbox" checked=buffered.show_on_user_card}} {{i18n "admin.user_fields.show_on_user_card.title"}}
|
2016-04-08 20:35:41 +08:00
|
|
|
{{/admin-form-row}}
|
|
|
|
|
2015-07-28 02:22:12 +08:00
|
|
|
{{#admin-form-row}}
|
2019-01-10 18:06:01 +08:00
|
|
|
{{d-button action=(action "save") class="btn-primary" icon="check" label="admin.user_fields.save"}}
|
|
|
|
{{d-button action=(action "cancel") class="btn-danger" icon="times" label="admin.user_fields.cancel"}}
|
2015-07-28 02:22:12 +08:00
|
|
|
{{/admin-form-row}}
|
2015-07-11 00:28:56 +08:00
|
|
|
{{else}}
|
|
|
|
<div class="row">
|
2019-02-19 16:30:38 +08:00
|
|
|
<div class="form-display">
|
2015-07-31 02:52:53 +08:00
|
|
|
<strong>{{userField.name}}</strong>
|
|
|
|
<br>
|
2020-03-11 16:23:10 +08:00
|
|
|
{{html-safe userField.description}}
|
2015-07-31 02:52:53 +08:00
|
|
|
</div>
|
2019-02-19 16:30:38 +08:00
|
|
|
<div class="form-display">{{fieldName}}</div>
|
|
|
|
<div class="form-element controls">
|
2019-01-22 19:02:02 +08:00
|
|
|
{{d-button action=(action "edit") class="btn-default" icon="pencil-alt" label="admin.user_fields.edit"}}
|
|
|
|
{{d-button action=destroyAction actionParam=userField class="btn-danger" icon="far-trash-alt" label="admin.user_fields.delete"}}
|
2019-01-10 18:06:01 +08:00
|
|
|
{{d-button action=moveUpAction actionParam=userField class="btn-default" icon="arrow-up" disabled=cantMoveUp}}
|
|
|
|
{{d-button action=moveDownAction actionParam=userField class="btn-default" icon="arrow-down" disabled=cantMoveDown}}
|
2015-07-11 00:28:56 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">{{flags}}</div>
|
|
|
|
{{/if}}
|
2019-02-19 16:30:38 +08:00
|
|
|
<div class="clearfix"></div>
|