1. transport_mode depends on origin and 2. pickup timetable
Deploy PBT / deploy (push) Successful in 16s

This commit is contained in:
2026-09-11 13:30:54 +02:00
parent ca90346f0b
commit e931de1d3b
6 changed files with 131 additions and 5 deletions
+25 -2
View File
@@ -11,6 +11,7 @@
<option value="{{ option }}" {{ "selected" if fahrt and fahrt.transport_mode == option }}>{{ option }}</option>
{% endfor %}
</select>
<p class="field-hint" data-mode-hint></p>
</div>
<div class="field combo">
@@ -20,7 +21,12 @@
value="{{ fahrt.origin if fahrt else '' }}"
data-stop-input data-stop-target="#origin_stop_id">
<input type="hidden" id="origin_stop_id" name="origin_stop_id"
value="{{ fahrt.origin_stop_id if fahrt and fahrt.origin_stop_id else '' }}">
value="{{ fahrt.origin_stop_id if fahrt and fahrt.origin_stop_id else '' }}"
{% if fahrt and fahrt.origin_stop %}
data-stop-type="{{ fahrt.origin_stop.stop_type }}"
data-stop-lat="{{ fahrt.origin_stop.latitude }}"
data-stop-lon="{{ fahrt.origin_stop.longitude }}"
{% endif %}>
<p class="field-hint {{ 'matched' if fahrt and fahrt.origin_stop }}" data-stop-hint>{{
"✓ " ~ fahrt.origin_stop.name ~ (", " ~ fahrt.origin_stop.municipality if fahrt.origin_stop.municipality else "")
if fahrt and fahrt.origin_stop else "" }}</p>
@@ -33,7 +39,12 @@
value="{{ fahrt.destination if fahrt else '' }}"
data-stop-input data-stop-target="#destination_stop_id">
<input type="hidden" id="destination_stop_id" name="destination_stop_id"
value="{{ fahrt.destination_stop_id if fahrt and fahrt.destination_stop_id else '' }}">
value="{{ fahrt.destination_stop_id if fahrt and fahrt.destination_stop_id else '' }}"
{% if fahrt and fahrt.destination_stop %}
data-stop-type="{{ fahrt.destination_stop.stop_type }}"
data-stop-lat="{{ fahrt.destination_stop.latitude }}"
data-stop-lon="{{ fahrt.destination_stop.longitude }}"
{% endif %}>
<p class="field-hint {{ 'matched' if fahrt and fahrt.destination_stop }}" data-stop-hint>{{
"✓ " ~ fahrt.destination_stop.name ~ (", " ~ fahrt.destination_stop.municipality if fahrt.destination_stop.municipality else "")
if fahrt and fahrt.destination_stop else "" }}</p>
@@ -47,6 +58,18 @@
<p class="field-hint" data-line-hint>Halte oben wählen für Linienvorschläge.</p>
</div>
<div class="field">
<label for="course">Kurs <span class="field-optional">(Richtung, Abfahrtszeit optional)</span></label>
<input type="text" id="course" name="course" placeholder="z. B. Richtung Kleinzell, ab 14:32"
value="{{ fahrt.course if fahrt else '' }}">
<a class="btn secondary small" data-timetable-link target="_blank" rel="noopener"
style="margin-top: 0.5rem; align-self: flex-start;" aria-disabled="true">
🕒 Fahrplan öffnen
</a>
<p class="field-hint">Öffnet Google Maps (Öffis) für die gewählten Halte dort den genauen Kurs
ablesen und hier eintragen.</p>
</div>
<div class="field">
<label for="trip_date">Datum<span class="required">*</span></label>
<input type="date" id="trip_date" name="trip_date" value="{{ heute }}" required>