forked from beba/foerderbarometer
made mail.adult a required field
This commit is contained in:
parent
0d72a4b7c0
commit
a8d8f6fdd6
|
@ -97,10 +97,17 @@ class LiteratureForm(CheckForm):
|
|||
js = ('dropdown/js/base.js',)
|
||||
|
||||
class EmailForm(CheckForm):
|
||||
|
||||
# this is the code, to change required to false if needed
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
self.fields['adult'].required = True
|
||||
|
||||
|
||||
# TODO: add some javascript to show/hide other-field
|
||||
class Meta:
|
||||
model = Email
|
||||
fields = ['domain', 'address', 'other']
|
||||
fields = ['domain', 'address', 'other', 'adult']
|
||||
class Media:
|
||||
js = ('dropdown/js/base.js',)
|
||||
|
||||
|
|
Loading…
Reference in New Issue