|
|
@ -114,6 +114,11 @@ class LiteratureForm(CheckForm): |
|
|
|
class Media: |
|
|
|
js = ('dropdown/js/literature.js',) |
|
|
|
|
|
|
|
ADULT_CHOICES = {'TRUE': format_html('Ich bin volljährig.'), |
|
|
|
'FALSE': format_html('Ich bin noch nicht volljährig.') |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
class EmailForm(CheckForm): |
|
|
|
|
|
|
|
# this is the code, to change required to false if needed |
|
|
@ -122,6 +127,10 @@ class EmailForm(CheckForm): |
|
|
|
self.fields['adult'].required = True |
|
|
|
self.fields['other'].required = True |
|
|
|
|
|
|
|
adult = ChoiceField(label='Volljährigkeit', choices=ADULT_CHOICES.items(), widget=RadioSelect()) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# TODO: add some javascript to show/hide other-field |
|
|
|
class Meta: |
|
|
|
model = Email |
|
|
|