31 lines
1.4 KiB
HTML
31 lines
1.4 KiB
HTML
<tr id="user-{{ u.id }}">
|
|
<td colspan="7">
|
|
<form hx-post="/admin/users/{{ u.id }}"
|
|
hx-target="#user-{{ u.id }}"
|
|
hx-swap="outerHTML"
|
|
class="inline-edit">
|
|
<span class="muted">#{{ u.id }} · {{ u.email }}</span>
|
|
<label>Name <input type="text" name="full_name" value="{{ u.full_name or '' }}"></label>
|
|
<label>New password <input type="password" name="password" placeholder="(unchanged)"></label>
|
|
<label class="check"><input type="checkbox" name="is_active" value="true" {{ "checked" if u.is_active }}> Active</label>
|
|
<label class="check"><input type="checkbox" name="is_superuser" value="true" {{ "checked" if u.is_superuser }}> Superuser</label>
|
|
<fieldset class="roles-field">
|
|
<legend>Roles</legend>
|
|
{% for role in roles %}
|
|
<label class="check">
|
|
<input type="checkbox" name="role_ids" value="{{ role.id }}"
|
|
{{ "checked" if role in u.roles }}> {{ role.name }}
|
|
</label>
|
|
{% endfor %}
|
|
</fieldset>
|
|
<div class="row-actions">
|
|
<button type="submit" class="btn btn-primary">Save</button>
|
|
<button type="button" class="btn btn-ghost"
|
|
hx-get="/admin/users/{{ u.id }}/row"
|
|
hx-target="#user-{{ u.id }}"
|
|
hx-swap="outerHTML">Cancel</button>
|
|
</div>
|
|
</form>
|
|
</td>
|
|
</tr>
|