WMDE
/
eva
forked from tohe/eva
7
1
Fork 0

data preview step added to form (not working)

This commit is contained in:
Benni Bärmann 2021-01-13 15:21:22 +01:00
parent 4b1875eaeb
commit f7dc98b10c
3 changed files with 16 additions and 3 deletions

View File

@ -1,5 +1,5 @@
from django.db import models
from django.forms import ModelForm, DateInput
from django.forms import ModelForm, DateInput, Form
from .models import Employee
@ -10,6 +10,11 @@ from .models import Employee
# widgets = {'firstdate_employment': DateInput(attrs={'type': 'date'}),
# 'firstdate_presence': DateInput(attrs={'type': 'date'}),}
class DummyForm(Form):
class Meta:
model = Employee
fields = '__all__'
class FdbForm(ModelForm):
'''this base class provides the required css class for all forms'''
required_css_class = 'required'

View File

@ -40,9 +40,16 @@
IT-relevante Angaben
{% elif wizard.steps.step1 == 4 %}
Office-relevante Angaben
{% elif wizard.steps.step1 == 5 %}
Bestätigungsschritt
{% endif %}
</p>
</h2>
{% if wizard.steps.step1 == 5 %}
Hier könnten ihre Daten stehen.
{% else %}
<form action="" method="post">
{% csrf_token %}
<table>
@ -62,6 +69,7 @@
<p>
<span style="color: red">*</span> Pflichtfeld
<p>
{% endif %}
{% if wizard.steps.prev %}
<button formnovalidate="formnovalidate" name="wizard_goto_step" type="submit" value="{{ wizard.steps.prev }}">Zurück</button>
{% endif %}

View File

@ -9,7 +9,7 @@ from formtools.wizard.views import CookieWizardView
from django.shortcuts import render
from .models import Employee
from .forms import PersonalForm, WorkingForm, ITForm, OfficeForm
from .forms import PersonalForm, WorkingForm, ITForm, OfficeForm, DummyForm
from .settings import MAILS, EVA_MAIL
def success(request):
@ -47,7 +47,7 @@ def send_mail_to_department(department, data):
class EvaFormView(CookieWizardView):
# model = Employee
template_name = 'evapp/employee_form.html'
form_list = [PersonalForm, WorkingForm, ITForm, OfficeForm,]
form_list = [PersonalForm, WorkingForm, ITForm, OfficeForm, DummyForm]
instance = None
# form_class = EmployeeForm