Говорила мне мама...ну нахер эти ваши HDD
This commit is contained in:
+25
-6
@@ -5,18 +5,20 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{% block title %}Dashboard{% endblock %}</title>
|
||||
<link href="{{ url_for('static', filename='css/bootstrap.min.css') }}" rel="stylesheet">
|
||||
<link href="{{ url_for('static', filename='css/toastr.min.css') }}" rel="stylesheet">
|
||||
<link href="{{ url_for('static', filename='css/bootstrap-icons-1.11.3/font/bootstrap-icons.css') }}" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
<!-- Навигационное меню -->
|
||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="#">Dashboard</a>
|
||||
<a class="navbar-brand">Dashboard</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"
|
||||
aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarNav">
|
||||
<ul class="navbar-nav">
|
||||
{% if request.endpoint != 'auth.login' %}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link {% if request.endpoint == 'dashboard.dashboard' %}active{% endif %}" href="{{ url_for('dashboard.dashboard') }}">Главная</a>
|
||||
</li>
|
||||
@@ -29,16 +31,33 @@
|
||||
<li class="nav-item">
|
||||
<a class="nav-link {% if request.endpoint == 'dashboard.logs_page' %}active{% endif %}" href="{{ url_for('dashboard.logs_page') }}">Логи</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
{% if request.endpoint != 'auth.login' %}
|
||||
<div class="d-flex justify-content-end">
|
||||
<span class="navbar-text me-3">
|
||||
{% if session['display_name'] %}
|
||||
{{ session['display_name'] }}
|
||||
{% else %}
|
||||
Пользователь
|
||||
{% endif %}
|
||||
</span>
|
||||
<a class="btn btn-outline-danger" href="{{ url_for('dashboard.logout') }}">Выход</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<!-- Основной контент -->
|
||||
<div class="container mt-4">
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
<script src="{{ url_for('static', filename='js/jquery-3.6.0.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/bootstrap.bundle.min.js') }}"></script>
|
||||
|
||||
{% block scripts %}
|
||||
<script src="{{ url_for('static', filename='js/jquery-3.6.0.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/bootstrap.bundle.min.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/toastr.min.js') }}"></script>
|
||||
{% endblock %}
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
@@ -4,7 +4,7 @@
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-6">
|
||||
<h2>Login</h2>
|
||||
<form method="POST" action="{{ url_for('login') }}">
|
||||
<form method="POST" action="{{ url_for('auth.login') }}">
|
||||
<div class="form-group">
|
||||
<label for="username">Username</label>
|
||||
<input type="text" class="form-control" id="username" name="username" required>
|
||||
@@ -17,4 +17,5 @@
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
+259
-14
@@ -1,20 +1,265 @@
|
||||
<!-- templates/regions.html -->
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Регионы{% endblock %}
|
||||
{% block title %}Справочники{% endblock %}
|
||||
{% block content %}
|
||||
<h2>Регионы</h2>
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Название</th>
|
||||
<th>Активен</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="regions-table">
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="container">
|
||||
<h2 class="mb-4">Справочники</h2>
|
||||
|
||||
<ul class="nav nav-tabs" id="myTab" role="tablist">
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link active" id="regions-tab" data-bs-toggle="tab" data-bs-target="#regions" type="button" role="tab" aria-controls="regions" aria-selected="true">Регионы</button>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link" id="systems-tab" data-bs-toggle="tab" data-bs-target="#systems" type="button" role="tab" aria-controls="systems" aria-selected="false">Системы</button>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content" id="myTabContent">
|
||||
<div class="tab-pane fade show active" id="regions" role="tabpanel" aria-labelledby="regions-tab">
|
||||
<div class="mt-4">
|
||||
<button type="button" class="btn btn-primary mb-3" data-bs-toggle="modal" data-bs-target="#addRegionModal">
|
||||
<i class="bi bi-plus-circle"></i> Добавить регион
|
||||
</button>
|
||||
|
||||
<div class="modal fade" id="addRegionModal" tabindex="-1" aria-labelledby="addRegionModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="addRegionModalLabel">Добавить регион</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form id="add-region-form">
|
||||
<div class="mb-3">
|
||||
<label for="region-id" class="form-label">ID региона</label>
|
||||
<input type="text" class="form-control" id="region-id" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="region-name" class="form-label">Название региона</label>
|
||||
<input type="text" class="form-control" id="region-name" required>
|
||||
</div>
|
||||
<div class="mb-3 form-check">
|
||||
<input type="checkbox" class="form-check-input" id="region-active" checked>
|
||||
<label class="form-check-label" for="region-active">Активен</label>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Отмена</button>
|
||||
<button type="submit" form="add-region-form" class="btn btn-primary">Добавить</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 10%; cursor: pointer;" data-sort="region_id">ID</th>
|
||||
<th style="width: 50%; cursor: pointer;" data-sort="name">Название</th>
|
||||
<th style="width: 20%; cursor: pointer;" data-sort="active">Статус</th>
|
||||
<th style="width: 20%;">Действия</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="regions-table">
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<nav aria-label="Regions navigation">
|
||||
<ul class="pagination justify-content-center" id="pagination">
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane fade" id="systems" role="tabpanel" aria-labelledby="systems-tab">
|
||||
<div class="mt-4">
|
||||
<button type="button" class="btn btn-primary mb-3" data-bs-toggle="modal" data-bs-target="#addSystemModal">
|
||||
<i class="bi bi-plus-circle"></i> Добавить систему
|
||||
</button>
|
||||
|
||||
<div class="modal fade" id="addSystemModal" tabindex="-1" aria-labelledby="addSystemModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="addSystemModalLabel">Добавить систему</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form id="add-system-form">
|
||||
<div class="mb-3">
|
||||
<label for="system-id" class="form-label">ID системы</label>
|
||||
<input type="text" class="form-control" id="system-id" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="system-name-lat" class="form-label">Название системы (латиница)</label>
|
||||
<input type="text" class="form-control" id="system-name-lat" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="system-name-cyr" class="form-label">Название системы (кириллица)</label>
|
||||
<input type="text" class="form-control" id="system-name-cyr" required>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Отмена</button>
|
||||
<button type="submit" form="add-system-form" class="btn btn-primary">Добавить</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 10%; cursor: pointer;" data-sort="system_id">ID</th>
|
||||
<th style="width: 25%; cursor: pointer;" data-sort="system_name">Название (латиница)</th>
|
||||
<th style="width: 25%; cursor: pointer;" data-sort="name">Название (кириллица)</th>
|
||||
<th style="width: 20%;">Действия</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="systems-table">
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<nav aria-label="Systems navigation">
|
||||
<ul class="pagination justify-content-center" id="pagination">
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{# Модальное окно для редактирования региона#}
|
||||
<div class="modal fade" id="editRegionNameModal" tabindex="-1" aria-labelledby="editRegionNameModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="editRegionNameModalLabel">Изменить название региона</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form id="edit-region-name-form">
|
||||
<div class="mb-3">
|
||||
<label for="old-region-name" class="form-label">Прошлое название</label>
|
||||
<input type="text" class="form-control" id="old-region-name" readonly>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="new-region-name" class="form-label">Новое название</label>
|
||||
<input type="text" class="form-control" id="new-region-name" required>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<span id="edit-region-name-timer" class="me-2">5</span>
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Отмена</button>
|
||||
<button type="submit" form="edit-region-name-form" class="btn btn-primary" id="save-region-name-btn" disabled>Сохранить изменения</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{# Модальное окно для удаления региона#}
|
||||
<div class="modal fade" id="deleteRegionModal" tabindex="-1" aria-labelledby="deleteRegionModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="deleteRegionModalLabel">Подтверждение удаления</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Закрыть"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>Для подтверждения удаления введите слово "УДАЛИТЬ" большими буквами:</p>
|
||||
<input type="text" id="deleteConfirmationInput" class="form-control">
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Отмена</button>
|
||||
<button type="button" class="btn btn-danger" id="confirmDeleteButton" disabled>Удалить</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{# Модальное окно для отображения подписчиков региона #}
|
||||
<div class="modal fade" id="regionSubscribersModal" tabindex="-1" aria-labelledby="regionSubscribersModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="regionSubscribersModalLabel">Подписчики региона</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Закрыть"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Telegram ID</th>
|
||||
<th>Email</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="regionSubscribersTableBody">
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Закрыть</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{# Модальное окно для редактирования имени системы#}
|
||||
<div class="modal fade" id="editSystemNameModal" tabindex="-1" aria-labelledby="editSystemNameModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="editSystemNameModalLabel">Изменить название системы</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form id="edit-system-name-form">
|
||||
<div class="mb-3">
|
||||
<label for="old-system-name" class="form-label">Старое название системы</label>
|
||||
<input type="text" class="form-control" id="old-system-name" readonly>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="new-system-name" class="form-label">Новое название системы</label>
|
||||
<input type="text" class="form-control" id="new-system-name" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="edit-system-name-timer" class="form-label">Сохранить можно будет через: <span id="edit-system-name-timer">5</span> секунд</label>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Отмена</button>
|
||||
<button type="submit" form="edit-system-name-form" class="btn btn-primary" id="saveSystemNameBtn" disabled>Сохранить</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{# Модальное окно для удаления системы #}
|
||||
<div class="modal fade" id="deleteSystemModal" tabindex="-1" aria-labelledby="deleteSystemModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="deleteSystemModalLabel">Подтверждение удаления</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Закрыть"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>Для подтверждения удаления введите слово "УДАЛИТЬ" большими буквами:</p>
|
||||
<input type="text" id="deleteSystemConfirmationInput" class="form-control">
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Отмена</button>
|
||||
<button type="button" class="btn btn-danger" id="confirmDeleteSystemButton" disabled>Удалить</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
{{ super() }}
|
||||
<script src="{{ url_for('static', filename='js/regions.js') }}"></script>
|
||||
{% endblock %}
|
||||
+149
-29
@@ -2,41 +2,40 @@
|
||||
|
||||
{% block content %}
|
||||
<head>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/users.css') }}">
|
||||
<title>Пользователи</title>
|
||||
</head>
|
||||
<div class="container">
|
||||
<h1>Пользователи</h1>
|
||||
|
||||
<!-- Таблица пользователей -->
|
||||
<table class="table" id="users-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Chat ID</th>
|
||||
<th>Telegram ID</th>
|
||||
<th>Email</th>
|
||||
<th>Подписки</th>
|
||||
<th>Тип уведомлений</th>
|
||||
<th>Статус</th>
|
||||
<th>Действия</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- Данные будут загружаться сюда динамически -->
|
||||
</tbody>
|
||||
</table>
|
||||
<button class="btn btn-success mb-3" data-bs-toggle="modal" data-bs-target="#addUserModal">Добавить пользователя</button>
|
||||
<button class="btn btn-primary mb-3" data-bs-toggle="modal" data-bs-target="#searchUsersModal">Поиск</button>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped" id="users-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 8%;">Chat ID</th>
|
||||
<th style="width: 15%;">Telegram ID</th>
|
||||
<th style="width: 20%;">Email</th>
|
||||
<th style="width: 20%;">Подписки</th>
|
||||
<th style="width: 15%;">Тип уведомлений</th>
|
||||
<th style="width: 10%;">Статус</th>
|
||||
<th style="width: 12%;">Действия</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Пагинация -->
|
||||
<nav>
|
||||
<ul class="pagination" id="pagination">
|
||||
<!-- Страницы будут генерироваться динамически -->
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<!-- Модальное окно -->
|
||||
{# Модальное окно карточки пользователя #}
|
||||
<div id="userModal" class="modal fade" tabindex="-1" aria-labelledby="userModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-dialog modal-xl">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="userModalLabel">Редактирование пользователя</h5>
|
||||
@@ -44,21 +43,142 @@
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>Chat ID: <span id="userId"></span></p>
|
||||
<p>Telegram ID: <span id="username"></span></p>
|
||||
<p>Telegram ID: <span id="telegram_id"></span></p>
|
||||
<p>Email: <span id="userEmail"></span></p>
|
||||
|
||||
<div class="mt-3">
|
||||
<h6>События пользователя:</h6>
|
||||
<div class="overflow-auto" style="max-height: 300px;">
|
||||
<table class="table table-bordered table-striped" id="userEventsTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-nowrap">Действие</th>
|
||||
<th class="text-nowrap">Время</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button id="toggleBlockUser" class="btn btn-warning">Заблокировать</button>
|
||||
<button id="viewUserEvents" class="btn btn-info">Посмотреть действия</button>
|
||||
<button id="deleteUser" class="btn btn-danger">Удалить</button>
|
||||
{# <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Закрыть</button>#}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="addUserModal" class="modal fade" tabindex="-1" aria-labelledby="addUserModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="addUserModalLabel">Добавить пользователя</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="mb-3">
|
||||
<label for="newUserId" class="form-label">Chat ID</label>
|
||||
<input type="number" class="form-control" id="newUserId" min="1" maxlength="32" title="Введите числовое значение (максимум 32 символа)">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="newUsername" class="form-label">Telegram ID</label>
|
||||
<input type="text" class="form-control" id="newUsername" pattern="@.*" title="Начните с символа @">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="newUserEmail" class="form-label">Email</label>
|
||||
<input type="email" class="form-control" id="newUserEmail" pattern=".*@rtmis\.ru$" title="Должен содержать домен @rtmis.ru">
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button id="addNewUser" class="btn btn-success">Добавить</button>
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Закрыть</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Подключаем внешний JavaScript файл -->
|
||||
<script src="{{ url_for('static', filename='js/users.js') }}"></script>
|
||||
|
||||
<div class="modal fade" id="userEventsModal" tabindex="-1" role="dialog" aria-labelledby="userEventsModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="userEventsModalLabel">Действия пользователя</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body" id="userEventsModalBody" style="max-height: 400px; overflow-y: auto;">
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Закрыть</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{# Модальное окно для удаления пользователя #}
|
||||
<div class="modal fade" id="deleteConfirmationModal" tabindex="-1" aria-labelledby="deleteConfirmationModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="deleteConfirmationModalLabel">Подтверждение удаления</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>Для подтверждения удаления пользователя введите слово "УДАЛИТЬ" в поле ниже:</p>
|
||||
<label for="confirmationText"></label><input type="text" id="confirmationText" class="form-control" placeholder="УДАЛИТЬ">
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Отмена</button>
|
||||
<button type="button" class="btn btn-danger" id="confirmDeleteButton">Удалить</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{# Модальное окно поиска#}
|
||||
<div class="modal fade" id="searchUsersModal" tabindex="-1" aria-labelledby="searchUsersModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="searchUsersModalLabel">Поиск пользователей</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="mb-3">
|
||||
<label for="searchTelegramId" class="form-label">Telegram ID</label>
|
||||
<input type="text" class="form-control" id="searchTelegramId">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="searchEmail" class="form-label">Email</label>
|
||||
<input type="email" class="form-control" id="searchEmail">
|
||||
</div>
|
||||
{# Поле ФИО будет добавлено позже #}
|
||||
<div id="searchResults" style="display: none;">
|
||||
<h3>Результаты поиска:</h3>
|
||||
<table class="table table-bordered table-striped" id="searchResultsTableModal">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 8%;">Chat ID</th>
|
||||
<th style="width: 15%;">Telegram ID</th>
|
||||
<th style="width: 20%;">Email</th>
|
||||
<th style="width: 12%;">Действия</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button id="searchUsersButton" class="btn btn-primary">Поиск</button>
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Закрыть</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
{{ super() }}
|
||||
<script src="{{ url_for('static', filename='js/users.js') }}"></script>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user