Files
skeleton-api/app/templates/admin/_role_row_edit.html
T

27 lines
949 B
HTML

<tr id="role-{{ r.id }}">
<td colspan="5">
<form hx-post="/admin/roles/{{ r.id }}"
hx-target="#role-{{ r.id }}"
hx-swap="outerHTML"
class="inline-edit">
<span class="muted">#{{ r.id }} · {{ r.name }}</span>
<fieldset class="roles-field">
<legend>Permissions</legend>
{% for perm in permissions %}
<label class="check">
<input type="checkbox" name="permission_ids" value="{{ perm.id }}"
{{ "checked" if perm in r.permissions }}> {{ perm.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/roles/{{ r.id }}/row"
hx-target="#role-{{ r.id }}"
hx-swap="outerHTML">Cancel</button>
</div>
</form>
</td>
</tr>