{% macro new() %}

Neues Boot hinzufügen

{{ macros::input(label="Name", name="name", type="text", required=true) }} {{ macros::input(label="Anzahl Sitze", name="amount_seats", type="number", required=true, min=1) }} {{ macros::input(label="Baujahr", name="year_built", type="number", min=1950, max=2050) }} {{ macros::input(label="Bootsbauer", name="boatbuilder", type="text") }} {{ macros::select(label="Standort", data=locations, name='location_id', selected_id=1) }} {{ macros::select(label="Besitzer", data=users, name='owner', default="Verein") }} {{ macros::checkbox(label="handgesteuert", name="default_shipmaster_only_steering")}} {{ macros::checkbox(label="Skull", name="skull", checked=true)}} {{ macros::checkbox(label="Externes Boot (anderer Verein)", name="external")}}
{% endmacro new %} {% macro edit(boat, uuid) %}
{{ boat.name }}
{{ macros::input(label='Name', name='name', type='text', value=boat.name) }} {{ macros::input(label='Amount Seats', name='amount_seats', type='number', min=0, value=boat.amount_seats) }} {{ macros::select(data=locations, label='Standort', name='location_id', selected_id=boat.location_id) }} {{ macros::select(data=users, label='Besitzer', name='owner', selected_id=boat.owner, default="Vereinsboot") }} {{ macros::input(label='Baujahr', name='year_built', type='number', min=1950, value=boat.year_built) }} {{ macros::input(label='Bootsbauer', name='boatbuilder', type='text', value=boat.boatbuilder) }} {{ macros::checkbox(label='default_shipmaster_only_steering', name='default_shipmaster_only_steering', id=uuid , checked=boat.default_shipmaster_only_steering) }} {{ macros::checkbox(label='skull', name='skull', id=uuid , checked=boat.skull) }} {{ macros::checkbox(label='external', name='external', id=uuid , checked=boat.external) }}
{% include "includes/delete-icon" %} Löschen
{% endmacro edit %}