From 861df59ebc26efbae4535aa5240b71f12634e37f Mon Sep 17 00:00:00 2001 From: philipp Date: Fri, 28 Jul 2023 10:25:57 +0200 Subject: [PATCH] set some fields to required --- templates/includes/forms/log.html.tera | 7 +++---- templates/log.html.tera | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/templates/includes/forms/log.html.tera b/templates/includes/forms/log.html.tera index d4b5ca6..e8cde30 100644 --- a/templates/includes/forms/log.html.tera +++ b/templates/includes/forms/log.html.tera @@ -98,7 +98,7 @@ {% endif %} {% set amount_rowers = log.rowers | length %} {% set amount_guests = log.boat.amount_seats - amount_rowers -1 %} - {% if allowed_to_close and state == "on_water" %} + {% if allowed_to_close and state == "on_water" %} {{ log::home(log=log, only_ones=only_ones) }} {% else %} Ziel: {{ log.destination }}
@@ -125,7 +125,7 @@ {% macro home(log, only_ones) %}
- Destination: - {{ macros::input(label="Distanz", name="distance_in_km", id="distance_in_km_home", type="number", min=0, value=log.distance_in_km) }} + {{ macros::input(label="Distanz", name="distance_in_km", id="distance_in_km_home", type="number", min=0, value=log.distance_in_km, required=true) }} {{ macros::input(label="Kommentar", name="comments", type="text", value=log.comments) }} {{ macros::select(data=logtypes, select_name='logtype', default="Normal", selected_id=log.logtype) }} - {% if not only_ones %} {{ log::rower_select(id="rowers"~log.id, selected=log.rowers, amount_seats=log.boat.amount_seats) }} {% endif %} diff --git a/templates/log.html.tera b/templates/log.html.tera index 9772009..63f8c95 100644 --- a/templates/log.html.tera +++ b/templates/log.html.tera @@ -16,7 +16,7 @@

Am Wasser

{% for log in on_water %} {% if log.shipmaster == loggedin_user.id %} - {{ log::show(log=log, state="on_water", allowed_to_close=true, only_ones=false) }} + {{ log::show(log=log, state="on_water", allowed_to_close=true, only_ones=loggedin_user.is_cox==false) }} {% else %} {{ log::show(log=log, state="on_water", only_ones=true) }} {% endif %}