Files
MClogger/web/templates/group_admin/member_edit.html
2026-04-13 11:44:30 +02:00

57 lines
2.5 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{% extends "group_admin/base.html" %}
{% block title %}Permissions {{ member.username }}{% endblock %}
{% block content %}
<div class="d-flex align-items-center gap-2 mb-4">
<a href="{{ url_for('group_admin.members') }}" class="btn btn-sm btn-outline-secondary">
<i class="bi bi-arrow-left"></i>
</a>
<h2 class="mb-0">Permissions: <span class="text-warning">{{ member.username }}</span></h2>
</div>
<div class="row">
<div class="col-md-7">
<div class="card border-secondary">
<div class="card-header">
<i class="bi bi-shield-lock-fill me-2"></i>Panel Permissions
</div>
<div class="card-body">
<form method="post">
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
<div class="mb-3">
<label class="form-label">Role</label>
<select name="role" class="form-select">
{% for role, label in role_options %}
<option value="{{ role }}" {{ 'selected' if member.role == role }}>{{ label }}</option>
{% endfor %}
</select>
<div class="form-text">Group Owner and Group Admin can manage members and database settings.</div>
</div>
<hr>
<p class="form-label mb-2">Panel Access</p>
<div class="row g-2">
{% for key, label in all_permissions %}
<div class="col-md-6">
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" role="switch"
name="perm_{{ key }}" id="perm_{{ key }}"
{{ 'checked' if current_perms.get(key, True) }}>
<label class="form-check-label" for="perm_{{ key }}">{{ label }}</label>
</div>
</div>
{% endfor %}
</div>
<div class="d-flex gap-2 mt-4">
<button type="submit" class="btn btn-warning">
<i class="bi bi-check-lg me-1"></i>Save
</button>
<a href="{{ url_for('group_admin.members') }}" class="btn btn-outline-secondary">Cancel</a>
</div>
</form>
</div>
</div>
</div>
</div>
{% endblock %}