chol
/
eva
forked from tohe/eva
1
0
Fork 0

new form offboardingform

This commit is contained in:
Benni Bärmann 2021-11-10 13:11:00 +01:00
parent 60debb6e86
commit 86f30c8479
2 changed files with 11 additions and 1 deletions

View File

@ -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):

View File

@ -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',