This commit is contained in:
2023-02-09 12:16:04 +01:00
parent 1934fef0dd
commit 5200150828
16 changed files with 446 additions and 20 deletions

View File

@ -6,12 +6,42 @@
{{ day | date(format="%d.%m.%Y")}}
<br />
{% if days[day_string] and days[day_string].planned_amount_cox > 0%}
{% set cur_day = days[day_string] %}
{% if dwu[day_string] and dwu[day_string].day.planned_amount_cox > 0%}
{% set cur_day = dwu[day_string].day %}
{% set_global already_registered = false %}
Geplante Steuerpersonen: {{ cur_day.planned_amount_cox}}<br />
Geplante Abfahrtszeit: {{ cur_day.planned_starting_time }}<br />
Angemeldete Personen:
<ol>
{% for trip in dwu[day_string].trips %}
<li>
{% if trip.user.name == name.name %}
{% set_global already_registered = true %}
DU
{% else %}
{{ trip.user.name }}
{% endif %}
{% endfor %}
</ol>
{% if cur_day.open_registration %}
ANMELDEN
<details>
<summary class="button">&plus;</summary>
<form method="post" action="/register">
<input type="hidden" name="_method" value="put" />
<input type="hidden" name="day" value="{{ day_string }}" />
<div class="row">
<div class="six columns">
<label for="name">Name</label>
<input class="u-full-width" type="text" id="name" name="name" value="{% if already_registered == false %}{{ name.name }}{% endif %}" />
</div>
<div class="six columns">
<input class="button-primary" type="submit" value="Speichern">
</div>
</div>
</form>
</details>
{% else %}
Anmeldung an diesem Tag leider nicht möglich (zB bei USI Kursen)
{% endif %}

10
templates/name.html.tera Normal file
View File

@ -0,0 +1,10 @@
{% extends "base" %}
{% block content %}
What's your name?
<form action="/setname" method="post">
<input type="text" name="name"/>
<input type="submit" value="Speichern"/>
</form>
{% endblock content %}

View File

@ -0,0 +1,7 @@
<details>
<summary class="button">&plus;</summary>
<form method="post" action="/register">
<input type="hidden" name="_method" value="put" />
</form>
</details>