More dynamic menu handling. Did a lot of stuff using Flask-Nav & Flask_Menu, but removed all of it becauses it became overly complex or the extensions were no longer in active development.

This commit is contained in:
Josako
2024-04-28 22:15:47 +02:00
parent f782519c40
commit f4decbc0cd
7 changed files with 196 additions and 72 deletions

View File

@@ -0,0 +1,33 @@
{% extends 'base.html' %}
{% from "macros.html" import render_field %}
{% block title %}Tenant Selection{% endblock %}
{% block content_title %}Select a Tenant{% endblock %}
{% block content_description %}Select the active tenant for the current session{% endblock %}
{% block content %}
<form method="POST" action="{{ url_for('user_bp.handle_tenant_selection') }}">
<table class="table">
<thead>
<tr>
<th>Select</th>
<th>Tenant Name</th>
<th>Tenant ID</th>
</tr>
</thead>
<tbody>
{% for tenant in tenants %}
<tr>
<td><input type="radio" name="tenant_id" value="{{ tenant.id }}" required></td>
<td>{{ tenant.name }}</td>
<td>{{ tenant.id }}</td>
</tr>
{% endfor %}
</tbody>
</table>
<button type="submit" name="action" value="view_users" class="btn btn-primary">View Users</button>
<button type="submit" name="action" value="edit_tenant" class="btn btn-secondary">Edit Tenant</button>
<!-- Add more buttons as needed -->
</form>
{% endblock %}