mirror of
https://github.com/discourse/discourse.git
synced 2024-12-16 12:55:59 +08:00
e29605b79f
When the admin creates a new custom field they can specify if that field should be searchable or not. That setting is taken into consideration for quick search results.
66 lines
2.7 KiB
Handlebars
66 lines
2.7 KiB
Handlebars
{{#if editing}}
|
|
{{#admin-form-row label="admin.user_fields.type"}}
|
|
{{combo-box
|
|
content=fieldTypes
|
|
value=buffered.field_type
|
|
onChange=(action (mut buffered.field_type))
|
|
}}
|
|
{{/admin-form-row}}
|
|
|
|
{{#admin-form-row label="admin.user_fields.name"}}
|
|
{{input value=buffered.name class="user-field-name" maxlength="255"}}
|
|
{{/admin-form-row}}
|
|
|
|
{{#admin-form-row label="admin.user_fields.description"}}
|
|
{{input value=buffered.description class="user-field-desc" maxlength="255"}}
|
|
{{/admin-form-row}}
|
|
|
|
{{#if bufferedFieldType.hasOptions}}
|
|
{{#admin-form-row label="admin.user_fields.options"}}
|
|
{{value-list values=buffered.options inputType="array"}}
|
|
{{/admin-form-row}}
|
|
{{/if}}
|
|
|
|
{{#admin-form-row wrapLabel="true"}}
|
|
{{input type="checkbox" checked=buffered.editable}} <span>{{i18n "admin.user_fields.editable.title"}}</span>
|
|
{{/admin-form-row}}
|
|
|
|
{{#admin-form-row wrapLabel="true"}}
|
|
{{input type="checkbox" checked=buffered.required}} <span>{{i18n "admin.user_fields.required.title"}}</span>
|
|
{{/admin-form-row}}
|
|
|
|
{{#admin-form-row wrapLabel="true"}}
|
|
{{input type="checkbox" checked=buffered.show_on_profile}} <span>{{i18n "admin.user_fields.show_on_profile.title"}}</span>
|
|
{{/admin-form-row}}
|
|
|
|
{{#admin-form-row wrapLabel="true"}}
|
|
{{input type="checkbox" checked=buffered.show_on_user_card}} <span>{{i18n "admin.user_fields.show_on_user_card.title"}}</span>
|
|
{{/admin-form-row}}
|
|
|
|
{{#admin-form-row wrapLabel="true"}}
|
|
{{input type="checkbox" checked=buffered.searchable}} <span>{{i18n "admin.user_fields.searchable.title"}}</span>
|
|
{{/admin-form-row}}
|
|
|
|
{{#admin-form-row}}
|
|
{{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"}}
|
|
{{/admin-form-row}}
|
|
{{else}}
|
|
<div class="row">
|
|
<div class="form-display">
|
|
<strong>{{userField.name}}</strong>
|
|
<br>
|
|
{{html-safe userField.description}}
|
|
</div>
|
|
<div class="form-display">{{fieldName}}</div>
|
|
<div class="form-element controls">
|
|
{{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"}}
|
|
{{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}}
|
|
</div>
|
|
</div>
|
|
<div class="row">{{flags}}</div>
|
|
{{/if}}
|
|
<div class="clearfix"></div>
|