X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/SVBaL.git/blobdiff_plain/370a4e1e61a3b1e544195de29f29fc6a833567a3..b4b80676eb47a7028f5ea5222b541bdae746b584:/python/eh_util/eh_app/forms.py diff --git a/python/eh_util/eh_app/forms.py b/python/eh_util/eh_app/forms.py index 396bbe2..0b71c69 100644 --- a/python/eh_util/eh_app/forms.py +++ b/python/eh_util/eh_app/forms.py @@ -24,9 +24,14 @@ https://docs.djangoproject.com/en/2.2/topics/forms/ https://docs.djangoproject.com/en/2.2/ref/forms/fields/ ''' class KassenbriefForm(forms.Form): - briefpapier = forms.FileField(label='Briefpapier ändern:', required=False) + #briefpapier = forms.FileField(label='Briefpapier ändern:', required=False) + template = forms.ChoiceField(choices=[('AB', 'ab'),('BC','bc')]) basisbeitrag = forms.IntegerField() zusatzbeitrag = forms.IntegerField(label="Beitrag für Zusatzgrundstück") + def __init__(self, *args, templates=[('AB', 'ab'),('BC','bc')], **kwargs): + self.templates = templates + KassenbriefForm.template = forms.ChoiceField(choices=templates) + super().__init__(*args, **kwargs) class EhmeldungForm(forms.Form): VorZuname = forms.CharField(