1. transport_mode depends on origin and 2. pickup timetable
Deploy PBT / deploy (push) Successful in 16s
Deploy PBT / deploy (push) Successful in 16s
This commit is contained in:
@@ -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>
|
||||
|
||||
+11
-2
@@ -67,6 +67,7 @@
|
||||
display: block;
|
||||
}
|
||||
label .required { color: var(--danger); margin-left: 2px; }
|
||||
label .field-optional { color: var(--text-muted); font-weight: 400; margin-left: 2px; }
|
||||
.label-row { display: flex; justify-content: space-between; align-items: baseline; }
|
||||
.label-row a { font-size: 0.8rem; }
|
||||
|
||||
@@ -101,12 +102,20 @@
|
||||
width: 100%;
|
||||
}
|
||||
button:hover, .btn:hover { background: var(--accent-hover); }
|
||||
button.secondary {
|
||||
.secondary {
|
||||
background: transparent;
|
||||
border: 1px solid var(--panel-border);
|
||||
color: var(--text);
|
||||
}
|
||||
button.secondary:hover { background: rgba(255,255,255,0.04); }
|
||||
.secondary:hover { background: rgba(255,255,255,0.04); }
|
||||
a.btn, a.btn:hover { display: inline-block; text-align: center; text-decoration: none; }
|
||||
.btn.small {
|
||||
width: auto;
|
||||
padding: 0.45rem 0.8rem;
|
||||
font-size: 0.85rem;
|
||||
font-weight: 500;
|
||||
}
|
||||
.btn[aria-disabled="true"] { opacity: 0.5; pointer-events: none; }
|
||||
|
||||
.divider {
|
||||
display: flex;
|
||||
|
||||
@@ -25,7 +25,10 @@
|
||||
<tr>
|
||||
<td>{{ f.trip_date.strftime("%d.%m.%Y") }}</td>
|
||||
<td>{{ f.transport_mode }}</td>
|
||||
<td>{{ f.line or "–" }}</td>
|
||||
<td>
|
||||
{{ f.line or "–" }}
|
||||
{% if f.course %}<br><span style="color: var(--text-muted); font-size: 0.8rem;">{{ f.course }}</span>{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{{ f.origin }}{% if f.origin_stop %}<span class="stop-dot" title="Verifizierte Haltestelle"> ●</span>{% endif %}
|
||||
→ {{ f.destination }}{% if f.destination_stop %}<span class="stop-dot" title="Verifizierte Haltestelle"> ●</span>{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user