allow trip_type edit of trip

This commit is contained in:
2023-05-03 16:51:37 +02:00
parent 172901b80f
commit 787b28cc23
6 changed files with 20 additions and 7 deletions

View File

@ -37,11 +37,11 @@
</label>
{% endmacro checkbox %}
{% macro select(trip_types, select_name='trip_type', default='') %}
{% macro select(trip_types, select_name='trip_type', default='', selected_id='') %}
<select name="{{ select_name }}" class="input rounded-md h-10">
<option selected value>{{ default }}</option>
{% for trip_type in trip_types %}
<option value="{{ trip_type.id }}">{{ trip_type.name }}</option>
<option value="{{ trip_type.id }}" {% if trip_type.id == selected_id %} selected {% endif %}>{{ trip_type.name }}</option>
{% endfor %}
</select>
{% endmacro select %}