From 86f30c8479bf2b4e943b3cf55b429e1ba1aeab97 Mon Sep 17 00:00:00 2001 From: Benni Baermann Date: Wed, 10 Nov 2021 13:11:00 +0100 Subject: [PATCH] new form offboardingform --- evapp/forms.py | 6 ++++++ evapp/tests.py | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) 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',