40 lines
1.2 KiB
Handlebars
40 lines
1.2 KiB
Handlebars
<form class="grid-form" {{action 'save' on='submit'}}>
|
|
<fieldset>
|
|
<legend><em>{{name}}</em></legend>
|
|
<div data-row-span="1">
|
|
<div data-field-span="1">
|
|
<label>Name</label>
|
|
{{one-way-input type="text" class="user-name" value=name update=(action "nameDidChange")}}
|
|
</div>
|
|
</div>
|
|
<div data-row-span="1">
|
|
<div data-field-span="1">
|
|
<label>Email</label>
|
|
{{one-way-input type="text" class="email" value=email update=(action "emailDidChange")}}
|
|
</div>
|
|
</div>
|
|
<div data-row-span="1">
|
|
<div data-field-span="1">
|
|
<label>Role</label>
|
|
{{#if isAdmin}}
|
|
<select onchange={{action "roleDidChange" value="target.value"}}>
|
|
{{#each roles as |roleChoice|}}
|
|
<option value={{roleChoice}} selected={{equal role roleChoice}}>{{roleChoice}}</option>
|
|
{{/each}}
|
|
</select>
|
|
{{else}}
|
|
{{role}} {{!-- Not editable --}}
|
|
{{/if}}
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
<br>
|
|
<a class="button-red smaller" {{action 'cancel'}}>
|
|
Cancel
|
|
</a>
|
|
{{#if isDirty}}
|
|
<button type="submit" class="button-green smaller save-user">
|
|
Save
|
|
</button>
|
|
{{/if}}
|
|
</form>
|