chol
/
eva
forked from tohe/eva
1
0
Fork 0
eva/evapp/forms.py

37 lines
1.2 KiB
Python

from django.db import models
from django.forms import ModelForm, DateInput
from .models import Employee
# class EmployeeForm(ModelForm):
# class Meta:
# model = Employee
# fields = '__all__'
# widgets = {'firstdate_employment': DateInput(attrs={'type': 'date'}),
# 'firstdate_presence': DateInput(attrs={'type': 'date'}),}
class PersonalForm(ModelForm):
class Meta:
model = Employee
fields = ['firstname', 'lastname', 'email', 'department', 'team',]
class WorkingForm(ModelForm):
class Meta:
model = Employee
fields = ['firstdate_employment', 'firstdate_presence', 'jobdescription_german',
'jobdescription_english', 'desk',]
widgets = {'firstdate_employment': DateInput(attrs={'type': 'date'}),
'firstdate_presence': DateInput(attrs={'type': 'date'}),}
class ITForm(ModelForm):
class Meta:
model = Employee
fields = [
'laptop', 'os', 'screen', 'mobile', 'landline', 'comment',
'language', 'accounts', 'lists', ]
class OfficeForm(ModelForm):
class Meta:
model = Employee
fields = ['transponder', 'post_office_box',]