forked from Ruderverein-Donau-Linz/rowt
add full CRUD for boats
This commit is contained in:
@ -47,11 +47,13 @@
|
||||
</label>
|
||||
{% endmacro checkbox %}
|
||||
|
||||
{% macro select(trip_types, select_name='trip_type', default='', selected_id='') %}
|
||||
{% macro select(data, 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 }}" {% if trip_type.id == selected_id %} selected {% endif %}>{{ trip_type.name }}</option>
|
||||
{% if default %}
|
||||
<option selected value>{{ default }}</option>
|
||||
{% endif %}
|
||||
{% for d in data %}
|
||||
<option value="{{ d.id }}" {% if d.id == selected_id %} selected {% endif %}>{{ d.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% endmacro select %}
|
||||
|
Reference in New Issue
Block a user