diff --git a/evapp/forms.py b/evapp/forms.py index 00f016f..747cedf 100644 --- a/evapp/forms.py +++ b/evapp/forms.py @@ -30,6 +30,12 @@ class PersonalForm(EvaForm): model = Employee fields = ['firstname', 'lastname', 'department', 'team', ] +class OffboardingForm(EvaForm): + class Meta: + model: Employee + fields = ['lastdate_employment'] + widgets = {'lastdate_employment' : DateInput(attrs={'type': 'date'})} + class WorkingForm(EvaForm): def clean(self): diff --git a/evapp/tests.py b/evapp/tests.py index a408fc3..e55bb73 100644 --- a/evapp/tests.py +++ b/evapp/tests.py @@ -5,7 +5,7 @@ from django.conf import settings from django.http import HttpResponse from django.core import mail -from .forms import ITForm, WorkingForm, OfficeForm, DummyForm +from .forms import ITForm, WorkingForm, OfficeForm, DummyForm, OffboardingForm class LoginTestCase(TestCase): def setUp(self): @@ -97,6 +97,10 @@ class LoginTestCase(TestCase): '0-choice': 'OUT' }, OffboardingForm) + print() + print('ACHTUNG ACHTUNG') + print() + response = self._postform({ 'eva_form_view-current_step': '1', '1-firstdate_employment': '2021-01-01',