use proper names for new form fields
This commit is contained in:
parent
be5a235418
commit
855962369a
@ -74,7 +74,7 @@
|
|||||||
{% endmacro boat_select %}
|
{% endmacro boat_select %}
|
||||||
|
|
||||||
{% macro rower_select(id, selected, amount_seats='', class='', init='false', cox_on_boat='', steering_person_id='') %}
|
{% macro rower_select(id, selected, amount_seats='', class='', init='false', cox_on_boat='', steering_person_id='') %}
|
||||||
{% if not amount_seats or amount_seats > 1 %}
|
{#{% if not amount_seats or amount_seats > 1 %}#}
|
||||||
<div class="{{ class }}">
|
<div class="{{ class }}">
|
||||||
<label for="{{id}}" class="text-sm text-gray-600 ">Ruderer</label>
|
<label for="{{id}}" class="text-sm text-gray-600 ">Ruderer</label>
|
||||||
<select style="width: 100%;" multiple name="rowers[]" id="{{id}}" class="w-full" data-seats="{{amount_seats}}" data-init={{init}}>
|
<select style="width: 100%;" multiple name="rowers[]" id="{{id}}" class="w-full" data-seats="{{amount_seats}}" data-init={{init}}>
|
||||||
@ -94,7 +94,7 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{#{% endif %}#}
|
||||||
{% endmacro rower_select %}
|
{% endmacro rower_select %}
|
||||||
|
|
||||||
{% macro show(log, state, allowed_to_close=false, only_ones) %}
|
{% macro show(log, state, allowed_to_close=false, only_ones) %}
|
||||||
@ -213,13 +213,11 @@
|
|||||||
{% endmacro show_old %}
|
{% endmacro show_old %}
|
||||||
|
|
||||||
{% macro home(log, only_ones) %}
|
{% macro home(log, only_ones) %}
|
||||||
{# @MB: Maaaarieeee, please fix col-span-2 craziness #}
|
{# @MB: Maaaarieeee, please fix col-span-2 madness #}
|
||||||
<form class="grid grid-cols-1 gap-3" action="/log/{{log.id}}" method="post">
|
<form class="grid grid-cols-1 gap-3" action="/log/{{log.id}}" method="post">
|
||||||
{% if not only_ones %}
|
|
||||||
{{ log::rower_select(id="rowers"~log.id, selected=log.rowers, amount_seats=log.boat.amount_seats, class="col-span-2", steering_person_id=log.steering_user.id, cox_on_boat=log.shipmaster_user.id) }}
|
{{ log::rower_select(id="rowers"~log.id, selected=log.rowers, amount_seats=log.boat.amount_seats, class="col-span-2", steering_person_id=log.steering_user.id, cox_on_boat=log.shipmaster_user.id) }}
|
||||||
{{ macros::select(label="Schiffsführer", data=[], name='shipmaster', id="shipmaster-rowers"~log.id, wrapper_class="col-span-2", class="change-id-js", selected_id=log.shipmaster_user.id, required=true) }}
|
{{ macros::select(label="Schiffsführer", data=[], name='shipmaster', id="shipmaster-rowers"~log.id, wrapper_class="col-span-2", class="change-id-js", selected_id=log.shipmaster_user.id, required=true) }}
|
||||||
{{ macros::select(label="Steuerperson", data=[], name='steering_person', id="steering_person-rowers"~log.id, wrapper_class="col-span-2", class="change-id-js", selected_id=log.steering_user.id, required=true) }}
|
{{ macros::select(label="Steuerperson", data=[], name='steering_person', id="steering_person-rowers"~log.id, wrapper_class="col-span-2", class="change-id-js", selected_id=log.steering_user.id, required=true) }}
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<div class="col-span-2">
|
<div class="col-span-2">
|
||||||
{{ macros::checkbox(label="Handgesteuert", name="shipmaster_only_steering", id="shipmaster_only_steering" ~ log.id , checked=log.shipmaster_only_steering,class="rounded-md change-id-js") }}
|
{{ macros::checkbox(label="Handgesteuert", name="shipmaster_only_steering", id="shipmaster_only_steering" ~ log.id , checked=log.shipmaster_only_steering,class="rounded-md change-id-js") }}
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
{% extends "base" %}
|
{% extends "base" %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<div class="w-full">
|
<div class="w-full">
|
||||||
<h1 class="h1">Logbuch</h1>
|
<h1 class="h1">Logbuch</h1>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user