2014-09-25 11:32:08 -04:00
|
|
|
<div class='user-fields'>
|
|
|
|
<h2>{{i18n admin.user_fields.title}}</h2>
|
|
|
|
|
|
|
|
<p class="desc">{{i18n admin.user_fields.description}}</p>
|
|
|
|
|
|
|
|
{{#if model}}
|
|
|
|
{{#each f in model itemController="admin-user-field-item" itemView="admin-user-field-item"}}
|
|
|
|
{{#if f.editing}}
|
|
|
|
<div class='form-element'>
|
2014-09-26 14:48:34 -04:00
|
|
|
{{input value=f.buffered.name class="user-field-name" placeholder=userFieldsName}}
|
|
|
|
</div>
|
|
|
|
<div class='form-element'>
|
|
|
|
{{combo-box content=fieldTypes valueAttribute="id" value=f.buffered.field_type}}
|
2014-09-25 11:32:08 -04:00
|
|
|
</div>
|
|
|
|
<div class='form-element'>
|
2014-09-26 14:48:34 -04:00
|
|
|
<label>
|
|
|
|
{{input type="checkbox" checked=f.buffered.editable}} {{i18n admin.user_fields.editable.title}}
|
2014-09-25 11:32:08 -04:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
<div class='form-element controls'>
|
|
|
|
<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>
|
|
|
|
</div>
|
|
|
|
{{else}}
|
2014-09-26 14:48:34 -04:00
|
|
|
<div class='form-display'>{{f.name}}</div>
|
|
|
|
<div class='form-display'>{{f.fieldName}}</div>
|
2014-09-25 11:32:08 -04:00
|
|
|
<div class='form-display'>
|
2014-09-26 14:48:34 -04:00
|
|
|
{{#if f.editable}}
|
|
|
|
{{i18n admin.user_fields.editable.enabled}}
|
|
|
|
{{else}}
|
|
|
|
{{i18n admin.user_fields.editable.disabled}}
|
|
|
|
{{/if}}
|
2014-09-25 11:32:08 -04:00
|
|
|
</div>
|
|
|
|
<div class='form-element controls'>
|
|
|
|
<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>
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
<div class='clearfix'></div>
|
|
|
|
{{/each}}
|
|
|
|
{{/if}}
|
|
|
|
|
2014-09-30 16:04:04 -04:00
|
|
|
<button {{bind-attr disabled="createDisabled"}} class='btn btn-primary' {{action "createField"}}>
|
2014-09-25 11:32:08 -04:00
|
|
|
{{fa-icon "plus"}}
|
|
|
|
{{i18n admin.user_fields.create}}
|
|
|
|
</button>
|
|
|
|
</div>
|