Add option to enable/disable asking users for AStA membership confirmation
This commit is contained in:
parent
b50dcdf02f
commit
e134aa7009
|
@ -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
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue