From 3f9a84a3f2f679caccf92fff80a44fb8dabe9631 Mon Sep 17 00:00:00 2001
From: Benni Baermann
Date: Wed, 3 Feb 2021 10:53:02 +0100
Subject: [PATCH] complete new conditional forms handling with condition_dict
(still only partially working)
---
evapp/templates/evapp/employee_form.html | 14 ++---
evapp/urls.py | 7 ++-
evapp/views.py | 77 +++++++++++++++---------
3 files changed, 61 insertions(+), 37 deletions(-)
diff --git a/evapp/templates/evapp/employee_form.html b/evapp/templates/evapp/employee_form.html
index 6ec00b7..78a29b6 100644
--- a/evapp/templates/evapp/employee_form.html
+++ b/evapp/templates/evapp/employee_form.html
@@ -36,16 +36,16 @@
Angaben zur Person
{% elif wizard.steps.step1 == 2 %}
Angaben zum neuen Arbeitsverhältnis
- {% elif wizard.steps.step1 == 3 %}
+ {% elif wizard.steps.step1 == 3 and choice == 'IN' %}
IT-relevante Angaben
- {% elif wizard.steps.step1 == 4 %}
+ {% elif wizard.steps.step1 == 4 and choice == 'IN' %}
Office-relevante Angaben
- {% elif wizard.steps.step1 == 5 %}
+ {% else %}
Bestätigungsschritt
{% endif %}
- {% if wizard.steps.step1 == 5 or choice == 'CHANGE' and wizards.steps.step1 == 3 %}
+ {% if wizard.steps.step1 == 3 and choice == 'CHANGE' or wizards.steps.step1 == 5 %}
{% for key, value in data.items %}
{{ key }}: {{ value }}
{% endfor %}
@@ -53,9 +53,9 @@