always use your own name for registrations; except if the user has the add_different_user permission
This commit is contained in:
@ -76,9 +76,11 @@
|
||||
{% set cox_left = day.planned_amount_cox - amount_cox %}
|
||||
<div class="block text-red">Es {{ cox_left | pluralize(singular="wird", plural="werden")}} noch {{ cox_left }} Steuerperson{{ cox_left | pluralize(plural="en")}} gesucht!</div>
|
||||
{% endif %}
|
||||
{% set_global user_registered = false %}
|
||||
<strong class="block mt-1">Abfahrtszeit: {{ day.planned_starting_time }} Uhr</strong>
|
||||
|
||||
<div style="max-width: 75%">{{ default_trips | length }} angemeldete Person{{ default_trips | length | pluralize(plural="en") }}: {{ cox | length }} Steuerperson{{ cox | length | pluralize(plural="en") }} ({% for c in cox %}{{ c.user.name }} {% if c.user.name == user.name %}
|
||||
{% set_global user_registered = true %}
|
||||
<form method="post" action="/register">
|
||||
<input type="hidden" name="_method" value="delete" />
|
||||
<input type="hidden" name="id" value="{{ c.trip.id }}" />
|
||||
@ -91,6 +93,7 @@
|
||||
<li>
|
||||
{{ r.user.name }} (angemeldet seit {{ r.trip.created | date(format="%d.%m. %H:%M", timezone="Europe/Vienna") }})
|
||||
{% if r.user.name == user.name %}
|
||||
{% set_global user_registered = true %}
|
||||
<form method="post" action="/register">
|
||||
<input type="hidden" name="_method" value="delete" />
|
||||
<input type="hidden" name="id" value="{{ r.trip.id }}" />
|
||||
@ -103,31 +106,40 @@
|
||||
</ol>
|
||||
|
||||
{% if day.open_registration or user.is_cox %}
|
||||
<details class="text-right" style="margin-top: -6rem;">
|
||||
<summary class="button">+</summary>
|
||||
<form method="post" class="text-left" action="/register">
|
||||
<input type="hidden" name="_method" value="put" />
|
||||
<input type="hidden" name="day" value="{{ day_string }}" />
|
||||
<div class="row content-align-bottom">
|
||||
<div class="six columns">
|
||||
<label for="name">Name</label>
|
||||
<input class="u-full-width" type="text" id="name" name="name" value="{{ user.name }}" />
|
||||
</div>
|
||||
<div class="six columns">
|
||||
<input class="button-primary" type="submit" value="Speichern">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</details>
|
||||
{% if not user_registered or user.add_different_user %}
|
||||
<details class="text-right" style="margin-top: -6rem;">
|
||||
<summary class="button">+</summary>
|
||||
<form method="post" class="text-left" action="/register">
|
||||
<input type="hidden" name="_method" value="put" />
|
||||
<input type="hidden" name="day" value="{{ day_string }}" />
|
||||
<div class="row content-align-bottom">
|
||||
<div class="six columns">
|
||||
{% if user.add_different_user %}
|
||||
<label for="name">Name</label>
|
||||
<input class="u-full-width" type="text" id="name" name="name" value="{{ user.name }}" />
|
||||
{% else %}
|
||||
<input class="u-full-width" type="hidden" id="name" name="name" value="{{ user.name }}" />
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="six columns">
|
||||
<input class="button-primary" type="submit" value="Speichern">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</details>
|
||||
{% else %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
Anmeldung an diesem Tag leider nicht möglich (zB bei USI Kursen)
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% for trip in indep_trips %}
|
||||
{% set_global user_registered = false %}
|
||||
{% if trip.trip.begin %}
|
||||
{{trip.user.name}} @ {{trip.trip.begin}}
|
||||
{% set rowers = indep_trips | filter(attribute="trip.cox_id", value=trip.trip.id) %}
|
||||
{% set rowers = indep_trips | filter(attribute="trip.cox_id", value=trip.trip.id) | sort(attribute="trip.created")%}
|
||||
{% if trip.user.name == user.name and rowers | length == 0 %}
|
||||
{% set_global user_registered = true %}
|
||||
<form method="post" action="/register">
|
||||
<input type="hidden" name="_method" value="delete" />
|
||||
<input type="hidden" name="id" value="{{ trip.trip.id }}" />
|
||||
@ -140,6 +152,7 @@
|
||||
<li>
|
||||
{{ r.user.name }} (angemeldet seit {{ r.trip.created | date(format="%d.%m. %H:%M", timezone="Europe/Vienna") }})
|
||||
{% if r.user.name == user.name %}
|
||||
{% set_global user_registered = true %}
|
||||
<form method="post" action="/register">
|
||||
<input type="hidden" name="_method" value="delete" />
|
||||
<input type="hidden" name="id" value="{{ r.trip.id }}" />
|
||||
@ -150,6 +163,7 @@
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
{% if not user_registered or user.add_different_user %}
|
||||
<details class="text-right">
|
||||
<summary class="button">+</summary>
|
||||
<form method="post" class="text-left" action="/register">
|
||||
@ -158,8 +172,13 @@
|
||||
<input type="hidden" name="cox_id" value="{{ trip.trip.id }}" />
|
||||
<div class="row content-align-bottom">
|
||||
<div class="six columns">
|
||||
<label for="name">Name</label>
|
||||
<input class="u-full-width" type="text" id="name" name="name" value="{{ user.name }}" />
|
||||
|
||||
{% if user.add_different_user %}
|
||||
<label for="name">Name</label>
|
||||
<input class="u-full-width" type="text" id="name" name="name" value="{{ user.name }}" />
|
||||
{% else %}
|
||||
<input class="u-full-width" type="hidden" id="name" name="name" value="{{ user.name }}" />
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="six columns">
|
||||
<input class="button-primary" type="submit" value="Speichern">
|
||||
@ -167,6 +186,7 @@
|
||||
</div>
|
||||
</form>
|
||||
</details>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
|
Reference in New Issue
Block a user