no boat is selected by default in the logbook -> users don't accidentally 'select' external boat
This commit is contained in:
		| @@ -31,7 +31,7 @@ | ||||
|           method="post" | ||||
|           id="form" | ||||
|           class="grid grid-cols-4 gap-3" | ||||
|           onsubmit="Array.from(this.elements).forEach(e=>!e.value.trim()&&(e.disabled=true));"> | ||||
|           onsubmit="if (!this.elements['boat_id'].value) { alert('Kein Boot ausgewählt'); return false; }Array.from(this.elements).forEach(e=>!e.value.trim()&&(e.disabled=true));"> | ||||
|         {{ log::boat_select() }} | ||||
|         <div class="col-span-4 md:col-span-1"> | ||||
|             <div class="text-sm text-gray-600 dark:text-gray-100">Bootssteuerung</div> | ||||
| @@ -70,7 +70,7 @@ | ||||
|     </form> | ||||
| {% endmacro new %} | ||||
| {% macro boat_select(id="boat_id") %} | ||||
|     {{ macros::select(label="Boot", data=boats, name="boat_id", id=id, display=["name", " (","cat",")"], extras=["default_shipmaster_only_steering", "amount_seats", "on_water", "default_destination"], wrapper_class="col-span-4", show_seats=true) }} | ||||
|     {{ macros::select(label="Boot", data=boats, name="boat_id", id=id, display=["name", " (","cat",")"], extras=["default_shipmaster_only_steering", "amount_seats", "on_water", "default_destination"], wrapper_class="col-span-4", show_seats=true, nonSelectableDefault=" -- Wähle ein Boot aus ---") }} | ||||
| {% endmacro boat_select %} | ||||
| {% macro rower_select(id, selected, amount_seats='', class='', init='false', cox_on_boat='', steering_person_id='') %} | ||||
|     {#{% if not amount_seats or amount_seats > 1 %}#} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user