Optimizing admin interface for user domain, completing security views
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
{% extends 'base.html' %}
|
||||
{% from "macros.html" import render_selectable_table %}
|
||||
{% from "macros.html" import render_selectable_table, render_pagination %}
|
||||
|
||||
{% block title %}Tenant Selection{% endblock %}
|
||||
|
||||
@@ -8,37 +8,44 @@
|
||||
|
||||
{% block content %}
|
||||
<form method="POST" action="{{ url_for('user_bp.handle_tenant_selection') }}">
|
||||
{{ render_selectable_table(headers=["Tenant ID", "Tenant Name", "Website"], rows=tenants, selectable=True, id="tenantsTable") }}
|
||||
{{ 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="view_users" class="btn btn-secondary">View Users</button>
|
||||
<button type="submit" name="action" value="edit_tenant" class="btn btn-secondary">Edit Tenant</button>
|
||||
</div>
|
||||
</form>
|
||||
{% 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
|
||||
}
|
||||
],
|
||||
'order': [[1, 'asc']]
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% 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 %}#}
|
||||
|
||||
Reference in New Issue
Block a user