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.db import models
|
||||||
from django.forms import ModelForm, DateInput
|
from django.forms import ModelForm, DateInput, Form
|
||||||
|
|
||||||
from .models import Employee
|
from .models import Employee
|
||||||
|
|
||||||
|
@ -10,6 +10,11 @@ from .models import Employee
|
||||||
# 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 DummyForm(Form):
|
||||||
|
class Meta:
|
||||||
|
model = Employee
|
||||||
|
fields = '__all__'
|
||||||
|
|
||||||
class FdbForm(ModelForm):
|
class FdbForm(ModelForm):
|
||||||
'''this base class provides the required css class for all forms'''
|
'''this base class provides the required css class for all forms'''
|
||||||
required_css_class = 'required'
|
required_css_class = 'required'
|
||||||
|
|
|
@ -40,9 +40,16 @@
|
||||||
IT-relevante Angaben
|
IT-relevante Angaben
|
||||||
{% elif wizard.steps.step1 == 4 %}
|
{% elif wizard.steps.step1 == 4 %}
|
||||||
Office-relevante Angaben
|
Office-relevante Angaben
|
||||||
|
{% elif wizard.steps.step1 == 5 %}
|
||||||
|
Bestätigungsschritt
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</p>
|
</p>
|
||||||
</h2>
|
</h2>
|
||||||
|
{% if wizard.steps.step1 == 5 %}
|
||||||
|
|
||||||
|
Hier könnten ihre Daten stehen.
|
||||||
|
|
||||||
|
{% else %}
|
||||||
<form action="" method="post">
|
<form action="" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<table>
|
<table>
|
||||||
|
@ -62,6 +69,7 @@
|
||||||
<p>
|
<p>
|
||||||
<span style="color: red">*</span> Pflichtfeld
|
<span style="color: red">*</span> Pflichtfeld
|
||||||
<p>
|
<p>
|
||||||
|
{% endif %}
|
||||||
{% if wizard.steps.prev %}
|
{% if wizard.steps.prev %}
|
||||||
<button formnovalidate="formnovalidate" name="wizard_goto_step" type="submit" value="{{ wizard.steps.prev }}">Zurück</button>
|
<button formnovalidate="formnovalidate" name="wizard_goto_step" type="submit" value="{{ wizard.steps.prev }}">Zurück</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -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 PersonalForm, WorkingForm, ITForm, OfficeForm
|
from .forms import PersonalForm, WorkingForm, ITForm, OfficeForm, DummyForm
|
||||||
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, ITForm, OfficeForm,]
|
form_list = [PersonalForm, WorkingForm, ITForm, OfficeForm, DummyForm]
|
||||||
instance = None
|
instance = None
|
||||||
# form_class = EmployeeForm
|
# form_class = EmployeeForm
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue