52 lines
1.7 KiB
HTML
52 lines
1.7 KiB
HTML
{% extends 'base.html' %}
|
|
{% from "macros.html" import render_selectable_table, render_pagination %}
|
|
|
|
{% 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') }}">
|
|
{{ render_selectable_table(headers=["Tenant ID", "Tenant Name", "Website"], rows=rows, selectable=True, id="tenantsTable") }}
|
|
<div class="form-group mt-3">
|
|
<button type="submit" name="action" value="select_tenant" class="btn btn-primary">Set Session Tenant</button>
|
|
<button type="submit" name="action" value="edit_tenant" class="btn btn-secondary">Edit Tenant</button>
|
|
</div>
|
|
</form>
|
|
{% endblock %}
|
|
|
|
{% block content_footer %}
|
|
{{ render_pagination(pagination, 'user_bp.select_tenant') }}
|
|
{% endblock %}
|
|
|
|
{#{% block scripts %}#}
|
|
{#<script>#}
|
|
{#$(document).ready(function() {#}
|
|
{# $('#tenantsTable').DataTable({#}
|
|
{# 'columnDefs': [#}
|
|
{# {#}
|
|
{# 'targets': 0,#}
|
|
{# 'searchable': false,#}
|
|
{# 'orderable': false,#}
|
|
{# 'className': 'dt-body-center',#}
|
|
{# },#}
|
|
{# {#}
|
|
{# 'targets': 1,#}
|
|
{# 'orderable': true#}
|
|
{# },#}
|
|
{# {#}
|
|
{# 'targets': 2,#}
|
|
{# 'orderable': true#}
|
|
{# },#}
|
|
{# {#}
|
|
{# 'targets': 2,#}
|
|
{# 'orderable': true#}
|
|
{# },#}
|
|
{# ],#}
|
|
{# 'order': [[1, 'asc']]#}
|
|
{# });#}
|
|
{#});#}
|
|
{#</script>#}
|
|
{#{% endblock %}#}
|