diff --git a/evapp/templates/evapp/employee_form.html b/evapp/templates/evapp/employee_form.html index ba17a57..4784284 100644 --- a/evapp/templates/evapp/employee_form.html +++ b/evapp/templates/evapp/employee_form.html @@ -32,7 +32,7 @@
Schritt {{ wizard.steps.step1 }} von {{ wizard.steps.count }}
- Choice: {{choice}} + Choice: {{choice}} Datatable: {{datatable}}{% 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 %}
- {% if wizard.steps.step1 == 3 and choice == 'CHANGE' or wizards.steps.step1 == 6 %} + {% if datatable == True %} {% for key, value in data.items %} {{ key }}: {{ value }}{% endfor %} diff --git a/evapp/views.py b/evapp/views.py index 55d5bc0..16bacfc 100644 --- a/evapp/views.py +++ b/evapp/views.py @@ -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):