This commit is contained in:
Tykayn 2025-09-27 01:10:47 +02:00 committed by tykayn
parent dea71fc6b3
commit 11cd3236c5
13 changed files with 1952 additions and 71 deletions

View file

@ -12,11 +12,30 @@
<script src="https://unpkg.com/@mapbox/mapbox-gl-draw@1.4.3/dist/mapbox-gl-draw.js"></script>
<link rel="stylesheet" href="https://unpkg.com/@mapbox/mapbox-gl-draw@1.4.3/dist/mapbox-gl-draw.css" type="text/css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.4/css/bulma.min.css">
<script src="/static/event-types.js"></script>
{% endblock %}
{% block header %}Edit Event{% endblock %}
{% block content %}
<div class="properties-section" style="margin-bottom: 30px;">
<h3>Propriétés actuelles de l'événement</h3>
<div class="properties-table-container" style="max-height: 300px; overflow-y: auto; border: 1px solid #ddd; border-radius: 4px;">
<table id="propertiesTable" class="properties-table" style="width: 100%; border-collapse: collapse; font-family: monospace; font-size: 14px;">
<thead style="background-color: #f8f9fa; position: sticky; top: 0;">
<tr>
<th style="padding: 8px; text-align: left; border-bottom: 1px solid #ddd; font-weight: bold;">Propriété</th>
<th style="padding: 8px; text-align: left; border-bottom: 1px solid #ddd; font-weight: bold;">Valeur</th>
<th style="padding: 8px; text-align: left; border-bottom: 1px solid #ddd; font-weight: bold;">Type</th>
</tr>
</thead>
<tbody id="propertiesTableBody">
<!-- Les propriétés seront ajoutées par JavaScript -->
</tbody>
</table>
</div>
</div>
<form id="eventForm">
<input type="hidden" id="eventId" value="{{ id }}">
@ -38,7 +57,10 @@
<div class="form-group">
<label for="what" class="required">What</label>
<input type="text" id="what" name="what" placeholder="e.g., sport.match.football" required>
<div class="note">Category of the event (e.g., sport.match.football, culture.festival)</div>
<div class="note">
Category of the event (e.g., sport.match.football, culture.festival)<br>
<small style="color: #0078ff;">💡 Tapez au moins 2 caractères pour voir les suggestions avec emojis</small>
</div>
</div>
</div>
@ -72,6 +94,14 @@
<label class="required">Location</label>
<div id="map"></div>
<div class="note">Click on the map to set the event location</div>
<div style="margin-top: 10px;">
<button type="button" id="swapCoordinatesButton" style="background-color: #17a2b8; font-size: 14px; padding: 6px 12px;">
🔄 Inverser coordonnées (lat ↔ lon)
</button>
<small style="color: #666; margin-left: 10px;">
Utile si les coordonnées longitude/latitude ont été inversées
</small>
</div>
</div>
<div style="display: flex; gap: 10px;">