added ITForm and OfficeForm
This commit is contained in:
parent
390606e3d5
commit
b02c3820ec
|
@ -3,12 +3,12 @@ from django.forms import ModelForm, DateInput
|
||||||
|
|
||||||
from .models import Employee
|
from .models import Employee
|
||||||
|
|
||||||
class EmployeeForm(ModelForm):
|
# class EmployeeForm(ModelForm):
|
||||||
class Meta:
|
# class Meta:
|
||||||
model = Employee
|
# model = Employee
|
||||||
fields = '__all__'
|
# fields = '__all__'
|
||||||
widgets = {'firstdate_employment': DateInput(attrs={'type': 'date'}),
|
# widgets = {'firstdate_employment': DateInput(attrs={'type': 'date'}),
|
||||||
'firstdate_presence': DateInput(attrs={'type': 'date'}),}
|
# 'firstdate_presence': DateInput(attrs={'type': 'date'}),}
|
||||||
|
|
||||||
class PersonalForm(ModelForm):
|
class PersonalForm(ModelForm):
|
||||||
class Meta:
|
class Meta:
|
||||||
|
@ -18,6 +18,19 @@ class PersonalForm(ModelForm):
|
||||||
class WorkingForm(ModelForm):
|
class WorkingForm(ModelForm):
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Employee
|
model = Employee
|
||||||
fields = ['firstdate_employment', 'firstdate_presence', 'jobdescription_german', 'jobdescription_english', 'desk',]
|
fields = ['firstdate_employment', 'firstdate_presence', 'jobdescription_german',
|
||||||
|
'jobdescription_english', 'desk',]
|
||||||
widgets = {'firstdate_employment': DateInput(attrs={'type': 'date'}),
|
widgets = {'firstdate_employment': DateInput(attrs={'type': 'date'}),
|
||||||
'firstdate_presence': 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',]
|
||||||
|
|
|
@ -9,7 +9,7 @@ from formtools.wizard.views import CookieWizardView
|
||||||
from django.shortcuts import render
|
from django.shortcuts import render
|
||||||
|
|
||||||
from .models import Employee
|
from .models import Employee
|
||||||
from .forms import EmployeeForm, PersonalForm, WorkingForm
|
from .forms import PersonalForm, WorkingForm, ITForm, OfficeForm
|
||||||
from .settings import MAILS, EVA_MAIL
|
from .settings import MAILS, EVA_MAIL
|
||||||
|
|
||||||
def success(request):
|
def success(request):
|
||||||
|
@ -47,7 +47,7 @@ def send_mail_to_department(department, data):
|
||||||
class EvaFormView(CookieWizardView):
|
class EvaFormView(CookieWizardView):
|
||||||
# model = Employee
|
# model = Employee
|
||||||
template_name = 'evapp/employee_form.html'
|
template_name = 'evapp/employee_form.html'
|
||||||
form_list = [PersonalForm, WorkingForm]
|
form_list = [PersonalForm, WorkingForm, ITForm, OfficeForm,]
|
||||||
instance = None
|
instance = None
|
||||||
# form_class = EmployeeForm
|
# form_class = EmployeeForm
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue