mark required fields with red stars
This commit is contained in:
parent
b555af56bb
commit
4b1875eaeb
|
@ -10,12 +10,16 @@ from .models import Employee
|
|||
# widgets = {'firstdate_employment': DateInput(attrs={'type': 'date'}),
|
||||
# 'firstdate_presence': DateInput(attrs={'type': 'date'}),}
|
||||
|
||||
class PersonalForm(ModelForm):
|
||||
class FdbForm(ModelForm):
|
||||
'''this base class provides the required css class for all forms'''
|
||||
required_css_class = 'required'
|
||||
|
||||
class PersonalForm(FdbForm):
|
||||
class Meta:
|
||||
model = Employee
|
||||
fields = ['firstname', 'lastname', 'email', 'department', 'team',]
|
||||
|
||||
class WorkingForm(ModelForm):
|
||||
class WorkingForm(FdbForm):
|
||||
class Meta:
|
||||
model = Employee
|
||||
fields = ['firstdate_employment', 'firstdate_presence', 'jobdescription_german',
|
||||
|
@ -23,14 +27,14 @@ class WorkingForm(ModelForm):
|
|||
widgets = {'firstdate_employment': DateInput(attrs={'type': 'date'}),
|
||||
'firstdate_presence': DateInput(attrs={'type': 'date'}),}
|
||||
|
||||
class ITForm(ModelForm):
|
||||
class ITForm(FdbForm):
|
||||
class Meta:
|
||||
model = Employee
|
||||
fields = [
|
||||
'laptop', 'os', 'screen', 'mobile', 'landline', 'comment',
|
||||
'language', 'accounts', 'lists', ]
|
||||
|
||||
class OfficeForm(ModelForm):
|
||||
class OfficeForm(FdbForm):
|
||||
class Meta:
|
||||
model = Employee
|
||||
fields = ['transponder', 'post_office_box',]
|
||||
|
|
Loading…
Reference in New Issue