101 lines
4.9 KiB
HTML
101 lines
4.9 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="ru">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Редактирование события — Morozovka Portal</title>
|
|
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.min.css">
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/flatpickr/dist/themes/dark.css">
|
|
<script src="https://cdn.jsdelivr.net/npm/flatpickr"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/flatpickr/dist/l10n/ru.js"></script>
|
|
|
|
<style>
|
|
body { background: #0d1117; color: #e6edf3; font-family: sans-serif; padding: 40px; }
|
|
.container { max-width: 600px; margin: 0 auto; }
|
|
h2 { color: #58a6ff; }
|
|
.card { background: #161b22; border: 1px solid #30363d; border-radius: 8px; padding: 20px; }
|
|
|
|
.form-row { display: flex; gap: 15px; margin-bottom: 15px; flex-wrap: wrap; }
|
|
.form-group { display: flex; flex-direction: column; flex: 1; min-width: 200px; }
|
|
.form-group label { margin-bottom: 5px; font-size: 0.85rem; color: #8b949e; }
|
|
input, select, textarea { padding: 8px; background: #0d1117; color: white; border: 1px solid #30363d; border-radius: 5px; font-family: inherit; }
|
|
textarea { resize: vertical; min-height: 100px; }
|
|
|
|
button[type="submit"] { padding: 10px 20px; background: #238636; color: white; border: none; border-radius: 5px; cursor: pointer; font-weight: bold; }
|
|
button[type="submit"]:hover { background: #2ea043; }
|
|
|
|
.back-link { display: inline-block; margin-bottom: 20px; color: #8b949e; text-decoration: none; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<a href="/admin/schedule" class="back-link">← Назад к расписанию</a>
|
|
<h2>Редактирование события</h2>
|
|
|
|
<div class="card">
|
|
<form method="POST">
|
|
<div class="form-row">
|
|
<div class="form-group">
|
|
<label>Название</label>
|
|
<input type="text" name="title" value="{{ event.title }}" required>
|
|
</div>
|
|
<div class="form-group" style="flex: 0.5;">
|
|
<label>Тип</label>
|
|
<select name="event_type">
|
|
<option value="lecture" {% if event.event_type == 'lecture' %}selected{% endif %}>Лекция</option>
|
|
<option value="workshop" {% if event.event_type == 'workshop' %}selected{% endif %}>Мастер-класс</option>
|
|
<option value="meeting" {% if event.event_type == 'meeting' %}selected{% endif %}>Встреча</option>
|
|
<option value="personal" {% if event.event_type == 'personal' %}selected{% endif %}>Личное</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-row">
|
|
<div class="form-group">
|
|
<label>Место</label>
|
|
<input type="text" name="location" value="{{ event.location or '' }}">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-row">
|
|
<div class="form-group">
|
|
<label>Начало</label>
|
|
<input type="text" class="flatpickr" name="start_time" required value="{{ event.start_time|msk_strftime('%Y-%m-%d %H:%M') }}">
|
|
</div>
|
|
<div class="form-group">
|
|
<label>Конец</label>
|
|
<input type="text" class="flatpickr" name="end_time" required value="{{ event.end_time|msk_strftime('%Y-%m-%d %H:%M') }}">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-row" style="align-items: center;">
|
|
<div class="form-group" style="flex-direction: row; gap: 10px; align-items: center;">
|
|
<input type="checkbox" name="is_public" id="is_public" {% if event.is_public %}checked{% endif %}>
|
|
<label for="is_public" style="margin: 0; cursor: pointer;">Публичное событие</label>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-row">
|
|
<div class="form-group">
|
|
<label>Описание</label>
|
|
<textarea name="description">{{ event.description or '' }}</textarea>
|
|
</div>
|
|
</div>
|
|
|
|
<button type="submit">Сохранить изменения</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
flatpickr(".flatpickr", {
|
|
enableTime: true,
|
|
dateFormat: "Y-m-d H:i",
|
|
time_24hr: true,
|
|
locale: "ru",
|
|
minuteIncrement: 15
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|