]> wagnertech.de Git - SVBaL.git/blob - python/eh_util/eh_app/forms.py
63601f721f48e59b2908b7f03ba4cac73406d581
[SVBaL.git] / python / eh_util / eh_app / forms.py
1 from django import forms
2 '''
3 class UploadFileForm(forms.Form):
4     file1 = forms.FileField(label='S-Verein-Export')
5     
6 class DocumentForm(forms.Form):
7     docfile = forms.FileField(
8         label='Select a file',
9         help_text='max. 42 megabytes'
10     )
11
12 class TextInputForm(forms.Form):
13     text = forms.CharField(
14         label = "Text für das Anschreiben",
15         empty_value = "Bitte Text eingeben ...",
16         widget=forms.Textarea,
17     )
18 '''
19 from django.db.models.fields import BooleanField
20 '''
21 - Doku zu Forms:
22 https://docs.djangoproject.com/en/2.2/topics/forms/
23 - Doku zu Fields:
24 https://docs.djangoproject.com/en/2.2/ref/forms/fields/
25 '''
26 class VorlagenForm(forms.Form):
27     template      = forms.ChoiceField(choices=())
28     def __init__(self, *args, templates=[('AB', 'ab'),('BC','bc')], **kwargs):
29         #self.templates = templates
30         super().__init__(*args, **kwargs)
31         self.fields['template'].choices = templates
32
33 class BeitragForm(forms.Form):
34     basisbeitrag  = forms.IntegerField()
35     zusatzbeitrag = forms.IntegerField(label="Beitrag für Zusatzgrundstück")
36 class KassenbriefForm_alt(forms.Form):
37     #briefpapier   = forms.FileField(label='Briefpapier ändern:', required=False)
38     template      = forms.ChoiceField(choices=())
39     basisbeitrag  = forms.IntegerField()
40     zusatzbeitrag = forms.IntegerField(label="Beitrag für Zusatzgrundstück")
41     def __init__(self, *args, templates=[('AB', 'ab'),('BC','bc')], **kwargs):
42         #self.templates = templates
43         super().__init__(*args, **kwargs)
44         self.fields['template'].choices = templates
45
46 class EhmeldungForm(forms.Form):
47     VorZuname = forms.CharField(
48         label = "Vor- und Zuname",)
49     VorZunamePartner = forms.CharField(
50         label = "Vor- und Zuname Partner",
51         required=False)
52     Wohnanschrift = forms.CharField(label = "Wohnanschrift (Str, PLZ, Ort)")
53     Telefon = forms.CharField(
54         label = "Telefon",
55         required=False)
56     Email = forms.CharField(
57         label = "E-Mail",
58         required=False)
59     Geburtsdatum = forms.CharField(
60         label = "Geburtsdatum",
61         required=False)
62     VersichertesObjekt = forms.CharField(
63         label = "Versichertes Objekt",
64         required=False)
65     AnzahlWohnungen = forms.IntegerField(initial=1, label="Anzahl Wonungen")
66     Selbstgenutzt = forms.BooleanField(label="Selbstgenutzt", required=False)
67     Eigentumswohnung = forms.BooleanField(label="Eigentumswohnung", required=False)
68     Gewerblich = forms.BooleanField(label="(teilw.) gewerblich genutzt", required=False)
69