diff --git a/templates/includes/forms/log.html.tera b/templates/includes/forms/log.html.tera index 4f44ace..361eea7 100644 --- a/templates/includes/forms/log.html.tera +++ b/templates/includes/forms/log.html.tera @@ -1,6 +1,12 @@ {% macro new() %}
- {{ macros::select(data=boats, select_name='boat_id', display=["name", " (","amount_seats", " x)"], extras=["default_shipmaster_only_steering", "amount_seats"]) }} + {% if loggedin_user.is_cox %} + {{ macros::select(data=boats, select_name='boat_id', display=["name", " (","amount_seats", " x)"], extras=["default_shipmaster_only_steering", "amount_seats"]) }} + {% else %} + {% set ones = boats | filter(attribute="amount_seats", value=1) %} + {{ macros::select(data=ones, select_name='boat_id', display=["name", " (","amount_seats", " x)"], extras=["default_shipmaster_only_steering", "amount_seats"]) }} + + {% endif %} - {{ macros::select(data=coxes, select_name='shipmaster', selected_id=loggedin_user.id) }} - {{ macros::checkbox(label='shipmaster_only_steering', name='shipmaster_only_steering') }} + {% if loggedin_user.is_cox %} + + {% else %} + + {% endif %} + {% if loggedin_user.is_cox %} + {{ macros::checkbox(label='shipmaster_only_steering', name='shipmaster_only_steering') }} + {% endif %} Departure: Arrival: Destination: