From ae051b2b48d9bfdd6e87fe51cc029d00c63450ef Mon Sep 17 00:00:00 2001 From: Benni Baermann Date: Mon, 8 Feb 2021 11:28:32 +0100 Subject: [PATCH] cosmetic template changes --- evapp/templates/evapp/employee_form.html | 5 ++--- evapp/views.py | 4 +++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/evapp/templates/evapp/employee_form.html b/evapp/templates/evapp/employee_form.html index 4784284..fa0c248 100644 --- a/evapp/templates/evapp/employee_form.html +++ b/evapp/templates/evapp/employee_form.html @@ -32,7 +32,6 @@

Schritt {{ wizard.steps.step1 }} von {{ wizard.steps.count }}

- Choice: {{choice}} Datatable: {{datatable}}

{% if wizard.steps.step1 == 1 %} Angaben zur Person {% endif %} {% if choice == 'IN' %} @@ -61,8 +60,8 @@

{% csrf_token %} - {% if choice %} - Du hast {{choice}} ausgewählt. + {% if wizard.steps.step1 > 1 %} + Du hast den Prozess "{{choice_string}}" ausgewählt. {% endif %} {{ wizard.management_form }} {% if wizard.form.forms %} diff --git a/evapp/views.py b/evapp/views.py index 16bacfc..e03d560 100644 --- a/evapp/views.py +++ b/evapp/views.py @@ -65,7 +65,9 @@ class EvaFormView(CookieWizardView): #print('GETCONTEXT') context = super().get_context_data(form=form, **kwargs) - context.update({'choice': self.choice}) + context.update({'choice': self.choice, + 'choice_string': TYPE_CHOICES[self.choice]}) + 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,})