2014-09-25 23:32:08 +08:00
|
|
|
<div class='user-fields'>
|
2014-12-09 05:35:49 +08:00
|
|
|
<h2>{{i18n 'admin.user_fields.title'}}</h2>
|
2014-09-25 23:32:08 +08:00
|
|
|
|
2014-12-09 05:35:49 +08:00
|
|
|
<p class="desc">{{i18n 'admin.user_fields.help'}}</p>
|
2014-09-25 23:32:08 +08:00
|
|
|
|
|
|
|
{{#if model}}
|
|
|
|
{{#each f in model itemController="admin-user-field-item" itemView="admin-user-field-item"}}
|
|
|
|
{{#if f.editing}}
|
2014-10-03 03:56:28 +08:00
|
|
|
<div class='row'>
|
|
|
|
<div class='form-element'>
|
|
|
|
{{input value=f.buffered.name class="user-field-name" placeholder=userFieldsName}}
|
|
|
|
</div>
|
|
|
|
<div class='form-element'>
|
2014-10-09 02:38:18 +08:00
|
|
|
{{input value=f.buffered.description class="user-field-desc" placeholder=userFieldsDescription}}
|
2014-10-03 03:56:28 +08:00
|
|
|
</div>
|
|
|
|
<div class='form-element'>
|
2014-10-09 02:38:18 +08:00
|
|
|
{{combo-box content=fieldTypes valueAttribute="id" value=f.buffered.field_type}}
|
2014-10-03 03:56:28 +08:00
|
|
|
</div>
|
|
|
|
<div class='form-element controls'>
|
2014-12-09 05:35:49 +08:00
|
|
|
<button {{action "save"}}class='btn btn-primary'>{{fa-icon 'check'}} {{i18n 'admin.user_fields.save'}}</button>
|
|
|
|
<button {{action "cancel"}} class='btn btn-danger'>{{fa-icon 'times'}} {{i18n 'admin.user_fields.cancel'}}</button>
|
2014-10-03 03:56:28 +08:00
|
|
|
</div>
|
2014-09-27 02:48:34 +08:00
|
|
|
</div>
|
2014-10-03 03:56:28 +08:00
|
|
|
<div class="row">
|
|
|
|
<div class='form-element'>
|
2014-10-09 02:38:18 +08:00
|
|
|
<label>
|
2014-12-09 05:35:49 +08:00
|
|
|
{{input type="checkbox" checked=f.buffered.editable}} {{i18n 'admin.user_fields.editable.title'}}
|
2014-10-09 02:38:18 +08:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
<div class='form-element'>
|
|
|
|
<label>
|
2014-12-09 05:35:49 +08:00
|
|
|
{{input type="checkbox" checked=f.buffered.required}} {{i18n 'admin.user_fields.required.title'}}
|
2014-10-09 02:38:18 +08:00
|
|
|
</label>
|
2014-10-03 03:56:28 +08:00
|
|
|
</div>
|
2015-01-30 06:38:39 +08:00
|
|
|
<div class='form-element'>
|
|
|
|
<label>
|
|
|
|
{{input type="checkbox" checked=f.buffered.show_on_profile}} {{i18n 'admin.user_fields.show_on_profile.title'}}
|
|
|
|
</label>
|
|
|
|
</div>
|
2014-09-25 23:32:08 +08:00
|
|
|
</div>
|
|
|
|
{{else}}
|
2014-10-03 03:56:28 +08:00
|
|
|
<div class="row">
|
2014-10-09 02:38:18 +08:00
|
|
|
<div class='form-display'><strong>{{f.name}}</strong></div>
|
|
|
|
<div class='form-display'>{{{f.description}}}</div>
|
|
|
|
<div class='form-display'>{{f.fieldName}}</div>
|
2014-12-23 08:12:26 +08:00
|
|
|
<div class='form-display'></div>
|
2014-10-09 02:38:18 +08:00
|
|
|
<div class='form-element controls'>
|
2014-12-09 05:35:49 +08:00
|
|
|
<button {{action "edit"}}class='btn btn-default'>{{fa-icon 'pencil'}} {{i18n 'admin.user_fields.edit'}}</button>
|
|
|
|
<button {{action "destroy"}}class='btn btn-danger'>{{fa-icon 'trash-o'}} {{i18n 'admin.user_fields.delete'}}</button>
|
2014-10-09 02:38:18 +08:00
|
|
|
</div>
|
2014-09-25 23:32:08 +08:00
|
|
|
</div>
|
2014-10-09 02:38:18 +08:00
|
|
|
<div class="row">{{f.flags}}</div>
|
2014-09-25 23:32:08 +08:00
|
|
|
{{/if}}
|
|
|
|
<div class='clearfix'></div>
|
|
|
|
{{/each}}
|
|
|
|
{{/if}}
|
|
|
|
|
2014-10-01 04:04:04 +08:00
|
|
|
<button {{bind-attr disabled="createDisabled"}} class='btn btn-primary' {{action "createField"}}>
|
2014-09-25 23:32:08 +08:00
|
|
|
{{fa-icon "plus"}}
|
2014-12-09 05:35:49 +08:00
|
|
|
{{i18n 'admin.user_fields.create'}}
|
2014-09-25 23:32:08 +08:00
|
|
|
</button>
|
|
|
|
</div>
|