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
|
section = helper
|
||||||
name = "enable_registration"
|
name = "enable_registration"
|
||||||
default = True
|
default = True
|
||||||
|
|
||||||
|
@global_preferences_registry.register
|
||||||
|
class EnableAsta(types.BooleanPreference):
|
||||||
|
section = helper
|
||||||
|
name = "enable_asta"
|
||||||
|
default = True
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
{% block body %}
|
{% block body %}
|
||||||
<section class="section">
|
<section class="section">
|
||||||
<div class="container">
|
<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">
|
<div class="notification is-danger">
|
||||||
<a href="{% url 'asta' %}">Bitte bestätige deine AStA-Mitgliedschaft</a>
|
<a href="{% url 'asta' %}">Bitte bestätige deine AStA-Mitgliedschaft</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -23,6 +23,7 @@ def index(request):
|
||||||
|
|
||||||
context = {
|
context = {
|
||||||
"days": Shift.objects.datetimes("start_at", "day"),
|
"days": Shift.objects.datetimes("start_at", "day"),
|
||||||
|
"enable_asta": global_preferences["helper__enable_asta"],
|
||||||
}
|
}
|
||||||
|
|
||||||
if request.helper:
|
if request.helper:
|
||||||
|
|
Loading…
Reference in New Issue