From 78539cb5820ba399ca7ad237c9db79b6f0101088 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 8 Apr 2026 12:12:12 +0000 Subject: [PATCH] fixed form view for step 4 --- austritt/templates/austritt/employee_form.html | 9 --------- austritt/views.py | 11 +++++------ 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/austritt/templates/austritt/employee_form.html b/austritt/templates/austritt/employee_form.html index fc4fa16..f692587 100644 --- a/austritt/templates/austritt/employee_form.html +++ b/austritt/templates/austritt/employee_form.html @@ -50,15 +50,6 @@ {% translate "IT-relevante Angaben" %} {% elif wizard.steps.step1 == 4 %} {% translate "Sonstige Angaben" %} - - {% endif %} {% else %} diff --git a/austritt/views.py b/austritt/views.py index 71156a6..3412fc0 100644 --- a/austritt/views.py +++ b/austritt/views.py @@ -71,7 +71,7 @@ def beautify_data_pdf(data): class EvaFormView(LoginRequiredMixin, CookieWizardView): template_name = 'austritt/employee_form.html' - form_list = [PersonalForm, HRForm, ITForm, RestForm, DummyForm, DummyForm, DummyForm] + form_list = [PersonalForm, HRForm, ITForm, RestForm, DummyForm, DummyForm] instance = None choice = 'IN' @@ -116,7 +116,7 @@ class EvaFormView(LoginRequiredMixin, CookieWizardView): # six steps for testing purposes ONLY!! # deliver context for forms if we are in the last step - if (self.steps.step1 == 6 or (self.choice != 'IN' and self.steps.step1 == 6)): + if (self.steps.step1 == 5 or (self.choice != 'IN' and self.steps.step1 == 5)): context.update({'data': self.beautify_data(self.get_all_cleaned_data()), 'datatable': 1,}) @@ -180,7 +180,7 @@ class EvaFormView(LoginRequiredMixin, CookieWizardView): #hardcoded imagepath => change for production!!! context_pdf ={ 'pdf_data': pdf_data, - 'image_path': '/path/to/your/eva/austritt/static/evapp/logo.png' + 'image_path': '/srv/austritt/static/evapp/logo.png' } html_string =render_to_string('austritt/pdf_template.html', context_pdf, request=self.request) buffer=io.BytesIO() @@ -203,7 +203,7 @@ class EvaFormView(LoginRequiredMixin, CookieWizardView): elif department != "SUBMITTER": # comment this back in if you wanna run mail attachments - '''if pdf and department == "OFFICE": + if pdf and department == "OFFICE": mail= EmailMessage( subject=f'EVA: Austritt {firstname} {lastname} {lastday} (MAILTEST)', body=mail_template.render(context), @@ -213,8 +213,7 @@ class EvaFormView(LoginRequiredMixin, CookieWizardView): mail.attach(f'Rueckgabe_Arbeitsmittel_{firstname}_{lastname}.pdf', pdf_bytes, 'application/pdf') mail.send(fail_silently=False) else: - ''' - send_mail( + send_mail( f'EVA: Austritt {firstname} {lastname} {lastday}', mail_template.render(context), EVA_MAIL,