mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-25 08:39:38 -05:00
ac2f5cbdab
Also updated it to remove deprecations and item controller
47 lines
1.8 KiB
Handlebars
47 lines
1.8 KiB
Handlebars
{{#if editing}}
|
|
<div class='row'>
|
|
<div class='form-element'>
|
|
{{input value=buffered.name class="user-field-name" placeholder=userFieldsName}}
|
|
</div>
|
|
<div class='form-element'>
|
|
{{input value=buffered.description class="user-field-desc" placeholder=userFieldsDescription}}
|
|
</div>
|
|
<div class='form-element'>
|
|
{{combo-box content=fieldTypes valueAttribute="id" value=buffered.field_type}}
|
|
</div>
|
|
<div class='form-element controls'>
|
|
{{d-button action="save" class="btn-primary" icon="check" label="admin.user_fields.save"}}
|
|
{{d-button action="cancel" class="btn-danger" icon="times" label="admin.user_fields.cancel"}}
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class='form-element'>
|
|
<label>
|
|
{{input type="checkbox" checked=buffered.editable}} {{i18n 'admin.user_fields.editable.title'}}
|
|
</label>
|
|
</div>
|
|
<div class='form-element'>
|
|
<label>
|
|
{{input type="checkbox" checked=buffered.required}} {{i18n 'admin.user_fields.required.title'}}
|
|
</label>
|
|
</div>
|
|
<div class='form-element'>
|
|
<label>
|
|
{{input type="checkbox" checked=buffered.show_on_profile}} {{i18n 'admin.user_fields.show_on_profile.title'}}
|
|
</label>
|
|
</div>
|
|
</div>
|
|
{{else}}
|
|
<div class="row">
|
|
<div class='form-display'><strong>{{userField.name}}</strong></div>
|
|
<div class='form-display'>{{{userField.description}}}</div>
|
|
<div class='form-display'>{{fieldName}}</div>
|
|
<div class='form-display'></div>
|
|
<div class='form-element controls'>
|
|
{{d-button action="edit" class="btn-default" icon="pencil" label="admin.user_fields.edit"}}
|
|
{{d-button action="destroy" class="btn-danger" icon="trash-o" label="admin.user_fields.delete"}}
|
|
</div>
|
|
</div>
|
|
<div class="row">{{flags}}</div>
|
|
{{/if}}
|
|
<div class='clearfix'></div>
|