From 74cc2898cb44eef5d492a01186d7c3d0ed49cf83 Mon Sep 17 00:00:00 2001 From: Benni Baermann Date: Mon, 11 Jan 2021 16:12:20 +0100 Subject: [PATCH] some prelimary work for formtools --- evapp/forms.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/evapp/forms.py b/evapp/forms.py index 8d6a22b..2d799a2 100644 --- a/evapp/forms.py +++ b/evapp/forms.py @@ -9,3 +9,15 @@ class EmployeeForm(ModelForm): 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'}),}