From af767b9d08096f23dcb5776c524c1029515fd65a Mon Sep 17 00:00:00 2001 From: Benni Baermann Date: Mon, 19 Oct 2020 11:24:41 +0200 Subject: [PATCH] more choices added, use choices field in template --- input/forms.py | 8 ++++++-- input/templates/input/if_mail.txt | 9 +++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/input/forms.py b/input/forms.py index 6bf82a9..c9a85a7 100644 --- a/input/forms.py +++ b/input/forms.py @@ -15,8 +15,12 @@ class ProjectForm(ModelForm): class VolunteerForm(ModelForm): - CHOICES = [('IFG','ifg'), - ('Lib','library'),] + CHOICES = [('BIB', 'Bibliotheksstipendium'), + ('ELIT', 'eLiteraturstipendium'), + ('SOFT', 'Softwarestipendium'), + ('VIS', 'Visitenkarten, Mailingliste oder E-Mail-Adresse'), + ('IFG', 'Kostenübernahme IFG-Anfrage'), + ('LIB', 'library'),] choice = ChoiceField(choices=CHOICES, widget=RadioSelect) class Meta: diff --git a/input/templates/input/if_mail.txt b/input/templates/input/if_mail.txt index 08e3d5a..535a444 100644 --- a/input/templates/input/if_mail.txt +++ b/input/templates/input/if_mail.txt @@ -3,8 +3,13 @@ Hallo Team Ideenförderung, es gab einen neuen Antrag von {{data.realname}}. Username {{data.username}} fragt ein -{% if data.library %} Literaturstipendium {% endif %} -{% if data.url %} IFG {% endif %} +{% if data.choice == 'LIB' %} Literaturstipendium {% endif %} +{% if data.choice == 'BIB' %} Bibliotheksstipendium {% endif %} +{% if data.choice == 'IFG' %} IFG {% endif %} +{% if data.choice == 'ELIT' %} eLiteraturstipendium {% endif %} +{% if data.choice == 'SOFT' %} Softwarestipendium {% endif %} +{% if data.choice == 'VIS' %} Visitenkarten, Mailingliste oder E-Mail-Adresse {% endif %} + an. Genehmigen: INSERT Link here