Nice user interface and permission rework

This commit is contained in:
2018-10-19 19:25:55 +02:00
parent 4669e5a4e9
commit 616b7ccfc8
6 changed files with 143 additions and 19 deletions

View File

@ -64,6 +64,7 @@ from core.views.forms import (
)
from core.models import User, SithFile, Preferences, Gift
from subscription.models import Subscription
from counter.views import StudentCardForm
from trombi.views import UserTrombiForm
@ -741,6 +742,8 @@ class UserPreferencesView(UserTabsMixin, CanEditMixin, UpdateView):
kwargs = super(UserPreferencesView, self).get_context_data(**kwargs)
if not hasattr(self.object, "trombi_user"):
kwargs["trombi_form"] = UserTrombiForm()
if self.object.customer:
kwargs["student_card_form"] = StudentCardForm()
return kwargs