data preview step added to form (not working)
This commit is contained in:
parent
4b1875eaeb
commit
f7dc98b10c
|
@ -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'
|
||||
|
|
|
@ -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 %}
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue