Private
Public Access
1
0

downgrade notifications

This commit is contained in:
Sander Roosendaal
2018-12-20 17:40:32 +01:00
parent 954bd46bce
commit ab9579a048
10 changed files with 423 additions and 12 deletions

View File

@@ -721,6 +721,7 @@ class PlanSelectForm(forms.Form):
def __init__(self, *args, **kwargs):
paymentprocessor = kwargs.pop('paymentprocessor',None)
rower = kwargs.pop('rower',None)
includeall = kwargs.pop('includeall',False)
super(PlanSelectForm, self).__init__(*args, **kwargs)
self.fields['plan'].empty_label = None
if paymentprocessor:
@@ -731,7 +732,7 @@ class PlanSelectForm(forms.Form):
).order_by(
"price","clubsize","shortname"
)
if rower:
if rower and not includeall:
try:
amount = rower.paidplan.price
except AttributeError:
@@ -743,6 +744,7 @@ class PlanSelectForm(forms.Form):
).order_by(
"price","clubsize","shortname"
)
class CourseSelectForm(forms.Form):
course = forms.ModelChoiceField(queryset=GeoCourse.objects.all())