mirror of
https://github.com/MeshTender/MeshTender.git
synced 2026-09-04 11:03:52 +00:00
31 lines
1.5 KiB
HTML
31 lines
1.5 KiB
HTML
{{/* permissions-modal is the htmx fragment swapped into the shared user modal.
|
|
The form posts normally (full navigation back to /admin/users), which also
|
|
closes the modal — no extra client JS needed. */}}
|
|
{{define "permissions-modal"}}
|
|
<div class="modal-header">
|
|
<h2 class="modal-title">Permissions — {{.Account.Name}} <span class="text-secondary">@{{.Account.Username}}</span></h2>
|
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
|
</div>
|
|
<form method="post" action="/admin/users/{{.Account.ID}}">
|
|
<div class="modal-body">
|
|
<p class="text-secondary">
|
|
<strong>Manage users</strong> = grant/revoke these capabilities (superadmin).
|
|
<strong>Manage catalog</strong> = edit the command catalog. Neither grants access to any
|
|
repeater — that's still per-repeater sharing.
|
|
</p>
|
|
<label class="form-check">
|
|
<input class="form-check-input" type="checkbox" name="manage_users" {{if .Account.CapManageUsers}}checked{{end}}>
|
|
<span class="form-check-label">Manage users</span>
|
|
</label>
|
|
<label class="form-check">
|
|
<input class="form-check-input" type="checkbox" name="manage_catalog" {{if .Account.CapManageCatalog}}checked{{end}}>
|
|
<span class="form-check-label">Manage catalog</span>
|
|
</label>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-link link-secondary me-auto" data-bs-dismiss="modal">Cancel</button>
|
|
<button type="submit" class="btn btn-primary">Save</button>
|
|
</div>
|
|
</form>
|
|
{{end}}
|