use proper names for new form fields

This commit is contained in:
philipp 2023-10-30 13:49:49 +01:00
parent be5a235418
commit 855962369a
2 changed files with 45 additions and 48 deletions

View File

@ -74,7 +74,7 @@
{% 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 %}
{#{% if not amount_seats or amount_seats > 1 %}#}
<div class="{{ class }}">
<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}}>
@ -94,7 +94,7 @@
{% endfor %}
</select>
</div>
{% endif %}
{#{% endif %}#}
{% endmacro rower_select %}
{% macro show(log, state, allowed_to_close=false, only_ones) %}
@ -213,13 +213,11 @@
{% endmacro show_old %}
{% 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">
{% 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) }}
{{ 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) }}
{% endif %}
<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") }}

View File

@ -4,7 +4,6 @@
{% extends "base" %}
{% block content %}
<div class="w-full">
<h1 class="h1">Logbuch</h1>