2
0
Fork 0

Add option to enable/disable asking users for AStA membership confirmation

This commit is contained in:
Luca 2023-05-06 17:44:14 +02:00
parent b50dcdf02f
commit e134aa7009
3 changed files with 8 additions and 1 deletions

View File

@ -63,3 +63,9 @@ class EnableRegistration(types.BooleanPreference):
section = helper
name = "enable_registration"
default = True
@global_preferences_registry.register
class EnableAsta(types.BooleanPreference):
section = helper
name = "enable_asta"
default = True

View File

@ -5,7 +5,7 @@
{% block body %}
<section class="section">
<div class="container">
{% if helper and not helper.asta_confirmed %}
{% if helper and not helper.asta_confirmed and enable_asta %}
<div class="notification is-danger">
<a href="{% url 'asta' %}">Bitte bestätige deine AStA-Mitgliedschaft</a>
</div>

View File

@ -23,6 +23,7 @@ def index(request):
context = {
"days": Shift.objects.datetimes("start_at", "day"),
"enable_asta": global_preferences["helper__enable_asta"],
}
if request.helper: