set some fields to required
This commit is contained in:
parent
267672b96b
commit
861df59ebc
@ -125,7 +125,7 @@
|
|||||||
|
|
||||||
{% macro home(log, only_ones) %}
|
{% macro home(log, only_ones) %}
|
||||||
<form action="/log/{{log.id}}" method="post">
|
<form action="/log/{{log.id}}" method="post">
|
||||||
Destination: <input type="search" list="destinations" placeholder="Destination" id="destination-home" name="destination" value="{{log.destination}}" oninput="var inputElement = document.getElementById('destination-home');
|
Destination: <input type="search" list="destinations" placeholder="Destination" required="required", id="destination-home" name="destination" value="{{log.destination}}" oninput="var inputElement = document.getElementById('destination-home');
|
||||||
var dataList = document.getElementById('destinations');
|
var dataList = document.getElementById('destinations');
|
||||||
var selectedValue = inputElement.value;
|
var selectedValue = inputElement.value;
|
||||||
for (var i = 0; i < dataList.options.length; i++) {
|
for (var i = 0; i < dataList.options.length; i++) {
|
||||||
@ -135,10 +135,9 @@
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}">
|
}">
|
||||||
{{ 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::input(label="Kommentar", name="comments", type="text", value=log.comments) }}
|
||||||
{{ macros::select(data=logtypes, select_name='logtype', default="Normal", selected_id=log.logtype) }}
|
{{ macros::select(data=logtypes, select_name='logtype', default="Normal", selected_id=log.logtype) }}
|
||||||
|
|
||||||
{% if not only_ones %}
|
{% if not only_ones %}
|
||||||
{{ log::rower_select(id="rowers"~log.id, selected=log.rowers, amount_seats=log.boat.amount_seats) }}
|
{{ log::rower_select(id="rowers"~log.id, selected=log.rowers, amount_seats=log.boat.amount_seats) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
<h2 style="font-size: 100px">Am Wasser</h2>
|
<h2 style="font-size: 100px">Am Wasser</h2>
|
||||||
{% for log in on_water %}
|
{% for log in on_water %}
|
||||||
{% if log.shipmaster == loggedin_user.id %}
|
{% 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 %}
|
{% else %}
|
||||||
{{ log::show(log=log, state="on_water", only_ones=true) }}
|
{{ log::show(log=log, state="on_water", only_ones=true) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user