+14
-14
@@ -5,8 +5,8 @@
|
||||
<h2>Neue Fahrt erfassen</h2>
|
||||
<form method="post">
|
||||
<div class="field">
|
||||
<label for="verkehrsmittel">Verkehrsmittel<span class="required">*</span></label>
|
||||
<select id="verkehrsmittel" name="verkehrsmittel" required>
|
||||
<label for="transport_mode">Verkehrsmittel<span class="required">*</span></label>
|
||||
<select id="transport_mode" name="transport_mode" required>
|
||||
{% for option in verkehrsmittel_optionen %}
|
||||
<option value="{{ option }}">{{ option }}</option>
|
||||
{% endfor %}
|
||||
@@ -14,28 +14,28 @@
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<label for="linie">Linie</label>
|
||||
<input type="text" id="linie" name="linie" placeholder="z.B. S3, Bus 10">
|
||||
<label for="line">Linie</label>
|
||||
<input type="text" id="line" name="line" placeholder="z.B. S3, Bus 10">
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<label for="von">Von<span class="required">*</span></label>
|
||||
<input type="text" id="von" name="von" required>
|
||||
<label for="origin">Von<span class="required">*</span></label>
|
||||
<input type="text" id="origin" name="origin" required>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<label for="nach">Nach<span class="required">*</span></label>
|
||||
<input type="text" id="nach" name="nach" required>
|
||||
<label for="destination">Nach<span class="required">*</span></label>
|
||||
<input type="text" id="destination" name="destination" required>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<label for="datum">Datum<span class="required">*</span></label>
|
||||
<input type="date" id="datum" name="datum" value="{{ heute }}" required>
|
||||
<label for="trip_date">Datum<span class="required">*</span></label>
|
||||
<input type="date" id="trip_date" name="trip_date" value="{{ heute }}" required>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<label for="bewertung">Bewertung<span class="required">*</span></label>
|
||||
<select id="bewertung" name="bewertung" required>
|
||||
<label for="rating">Bewertung<span class="required">*</span></label>
|
||||
<select id="rating" name="rating" required>
|
||||
<option value="5">★★★★★ Sehr gut</option>
|
||||
<option value="4">★★★★☆ Gut</option>
|
||||
<option value="3" selected>★★★☆☆ Okay</option>
|
||||
@@ -45,8 +45,8 @@
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<label for="kommentar">Kommentar</label>
|
||||
<textarea id="kommentar" name="kommentar" rows="3"></textarea>
|
||||
<label for="comment">Kommentar</label>
|
||||
<textarea id="comment" name="comment" rows="3"></textarea>
|
||||
</div>
|
||||
|
||||
<button type="submit">Speichern</button>
|
||||
|
||||
@@ -23,19 +23,19 @@
|
||||
<tbody>
|
||||
{% for f in fahrten %}
|
||||
<tr>
|
||||
<td>{{ f.datum.strftime("%d.%m.%Y") }}</td>
|
||||
<td>{{ f.verkehrsmittel }}</td>
|
||||
<td>{{ f.linie or "–" }}</td>
|
||||
<td>{{ f.von }} → {{ f.nach }}</td>
|
||||
<td class="stars">{{ "★" * f.bewertung }}{{ "☆" * (5 - f.bewertung) }}</td>
|
||||
<td>{{ f.trip_date.strftime("%d.%m.%Y") }}</td>
|
||||
<td>{{ f.transport_mode }}</td>
|
||||
<td>{{ f.line or "–" }}</td>
|
||||
<td>{{ f.origin }} → {{ f.destination }}</td>
|
||||
<td class="stars">{{ "★" * f.rating }}{{ "☆" * (5 - f.rating) }}</td>
|
||||
<td>
|
||||
<form method="post" action="{{ url_for('fahrt_loeschen', fahrt_id=f.id) }}" onsubmit="return confirm('Fahrt wirklich löschen?');" style="margin: 0;">
|
||||
<button type="submit" class="secondary" style="width: auto; padding: 0.35rem 0.7rem; font-size: 0.8rem;">Löschen</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{% if f.kommentar %}
|
||||
<tr><td></td><td colspan="5" style="color: var(--text-muted); font-size: 0.85rem;">{{ f.kommentar }}</td></tr>
|
||||
{% if f.comment %}
|
||||
<tr><td></td><td colspan="5" style="color: var(--text-muted); font-size: 0.85rem;">{{ f.comment }}</td></tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
||||
Reference in New Issue
Block a user