mirror of
https://codeberg.org/Mo8it/AdvLabDB.git
synced 2024-12-20 23:41:20 +00:00
31 lines
778 B
HTML
31 lines
778 B
HTML
{% extends "layout.html" %}
|
|
{% block content %}
|
|
|
|
{{table|safe}}
|
|
<div>
|
|
<button id="deactivateUsersButton" class="btn btn-warning">Deactivate users</button>
|
|
</div>
|
|
<br>
|
|
<form method="post">
|
|
<button type="submit" name="registerUser" class="btn btn-primary">Register user</button>
|
|
</form>
|
|
|
|
{% endblock content %}
|
|
|
|
{% block scripts %}
|
|
<script>
|
|
let $table = $('#usersTab')
|
|
let $button = $('#deactivateUsersButton')
|
|
|
|
$(function() {
|
|
$button.click(function () {
|
|
let users = $table.bootstrapTable('getSelections');
|
|
let emails = [];
|
|
for (var i=0; i<users.length; i++) {
|
|
emails.push(users[i]["email"])
|
|
}
|
|
window.location.href = '{{url_for("deactivate_users")}}?json=' + JSON.stringify(emails);
|
|
})
|
|
})
|
|
</script>
|
|
{% endblock scripts %}
|