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

confirmation step fixed

This commit is contained in:
Benni Bärmann 2021-02-04 12:59:23 +01:00
parent ab80f8c352
commit 82b137da5a
2 changed files with 8 additions and 9 deletions

View File

@ -32,7 +32,7 @@
</h1>
<h2>
<p>Schritt {{ wizard.steps.step1 }} von {{ wizard.steps.count }}</p>
Choice: {{choice}}
Choice: {{choice}} Datatable: {{datatable}}
<p>{% if wizard.steps.step1 == 1 %}
Angaben zur Person {% endif %}
{% if choice == 'IN' %}
@ -42,20 +42,18 @@
IT-relevante Angaben
{% elif wizard.steps.step1 == 4 %}
Office-relevante Angaben
{% elif wizards.steps.step1 == 5 %}
Bestätigungsschritt
{% endif %}
{% else %}
{% if wizard.steps.step1 == 2 %}
Veränderungsrelevante Angaben
{% elif wizards.steps.step1 == 3 %}
Bestätigungsschritt
{% endif %}
{% endif %}
{% if datatable == True %}
Bestätigungsschritt
{% endif %}
</p>
</h2>
{% if wizard.steps.step1 == 3 and choice == 'CHANGE' or wizards.steps.step1 == 6 %}
{% if datatable == True %}
{% for key, value in data.items %}
{{ key }}: {{ value }}<p>
{% endfor %}

View File

@ -66,8 +66,9 @@ class EvaFormView(CookieWizardView):
#print('GETCONTEXT')
context = super().get_context_data(form=form, **kwargs)
context.update({'choice': self.choice})
if (self.steps.current == 5 or (self.choice == 'CHANGE' and self.steps.current ==3)):
context.update({'data': self.beautify_data(self.get_all_cleaned_data())})
if (self.steps.step1 == 5 or (self.choice != 'IN' and self.steps.step1 == 3)):
context.update({'data': self.beautify_data(self.get_all_cleaned_data()),
'datatable': True,})
return context
def get_form_instance(self,step):