Merge branch 'non-BDE-members' into 'main'

Allow non-BDE members to use the note

See merge request bde/nk20!268
This commit is contained in:
bleizi 2024-09-05 23:15:04 +02:00
commit 33c94d0720
3 changed files with 4421 additions and 4353 deletions

File diff suppressed because it is too large Load Diff

View File

@ -300,9 +300,13 @@ class FutureUserDetailView(ProtectQuerysetMixin, LoginRequiredMixin, FormMixin,
# join_bde = True
# join_kfet = True
if not join_bde:
if not (join_bde or any(b for _, b in join_clubs)):
# This software belongs to the BDE.
form.add_error('join_bde', _("You must join the BDE."))
form.add_error('join_bde', _("You must join a club."))
return super().form_invalid(form)
if join_kfet and not join_bde:
form.add_error('join_bde', _("You must also join the parent club BDE."))
return super().form_invalid(form)
# Calculate required registration fee

View File

@ -66,13 +66,13 @@ SPDX-License-Identifier: GPL-3.0-or-later
<a class="nav-link {% if request.path_info == url %}active{% endif %}" href="{{ url }}"><i class="fa fa-coffee"></i> {% trans 'Consumptions' %}</a>
</li>
{% endif %}
{% if request.user.is_authenticated %}
<li class="nav-item">
{% if request.user.is_authenticated %}
<li class="nav-item">
{% url 'food:food_list' as url %}
<a class="nav-link {% if request.path_info == url %}active{% endif %}" href="{{ url }}"><i class="fa fa-cutlery"></i> {% trans 'Food' %}</a>
</li>
{% endif %}
{% if user.is_authenticated and user|is_member:"Kfet" %}
<a class="nav-link {% if request.path_info == url %}active{% endif %}" href="{{ url }}"><i class="fa fa-cutlery"></i> {% trans 'Food' %}</a>
</li>
{% endif %}
{% if user.is_authenticated %}
<li class="nav-item">
{% url 'note:transfer' as url %}
<a class="nav-link {% if request.path_info == url %}active{% endif %}" href="{{ url }}"><i class="fa fa-exchange"></i> {% trans 'Transfer' %}</a>