some changes (sorry, i lost track)

This commit is contained in:
Benni Bärmann 2020-10-27 15:50:46 +01:00
parent 209beea756
commit c7bde110a7
4 changed files with 36 additions and 11 deletions

View File

@ -0,0 +1,23 @@
# Generated by Django 3.1.1 on 2020-10-27 13:37
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('input', '0029_auto_20201027_1247'),
]
operations = [
migrations.AlterField(
model_name='businesscard',
name='data',
field=models.CharField(default='', max_length=1000, verbose_name='Persönliche Daten'),
),
migrations.AlterField(
model_name='businesscard',
name='sent_to',
field=models.CharField(default='', max_length=1000, verbose_name='Sendungsadresse'),
),
]

View File

@ -164,8 +164,8 @@ class BusinessCard(Extern):
project = models.CharField(max_length=20, choices=PROJECT_CHOICE.items(), project = models.CharField(max_length=20, choices=PROJECT_CHOICE.items(),
default='PEDIA', verbose_name='Wikimedia Projekt') default='PEDIA', verbose_name='Wikimedia Projekt')
data = models.CharField(max_length=1000, verbose_name='Persönliche Daten', default='NODATA') data = models.CharField(max_length=1000, verbose_name='Persönliche Daten', default='')
variant = models.CharField(max_length=5, choices=BC_VARIANT.items(), variant = models.CharField(max_length=5, choices=BC_VARIANT.items(),
default='NOPIC', verbose_name='Variante') default='NOPIC', verbose_name='Variante')
sent_to = models.CharField(max_length=1000, verbose_name='Sendungsadresse', sent_to = models.CharField(max_length=1000, verbose_name='Sendungsadresse',
default='NOADRESS') default='')

View File

@ -9,18 +9,15 @@ Der Nutzer mit dem Username {{data.username}} ({{data.email}}) fragt ein(e){% if
{% elif data.choice == 'SOFT' %} Softwarestipendium {% elif data.choice == 'SOFT' %} Softwarestipendium
{% elif data.choice == 'VIS' %} Visitenkarten {% elif data.choice == 'VIS' %} Visitenkarten
{% elif data.choice == 'MAIL' %} Mailadresse {% elif data.choice == 'MAIL' %} Mailadresse
{% elif data.choice == 'LIST' %} Mailingliste {% elif data.choice == 'LIST' %} Mailingliste {% else %} ERROR UNKNOWN FORMTYPE {% endif %} an.
{% else %} ERROR UNKNOWN FORMTYPE {% endif %} an.
{% if data.choice in ('BIB','ELIT','SOFT','LIT','IFG') %} {% if data.choice in data.grant %}
Vorraussichtliche Kosten: {{data.cost}} Vorraussichtliche Kosten: {{data.cost}}
Anmerkungen: {{data.notes}} Anmerkungen: {{data.notes}}
{% endif %} {% endif %} {% if data.choice in data.domain %}
{% if data.choice in ('MAIL', 'LIST') %}
Domain: {{data.domain}} Domain: {{data.domain}}
Adressenbestandteil: {{data.address}} Adressenbestandteil: {{data.address}}
{% endif %} {% endif %} {% if data.choice == 'BIB' %}
{% if data.choice == 'BIB' %}
Bibliothek: {{data.library}} Bibliothek: {{data.library}}
Dauer: {{data.duration}} Dauer: {{data.duration}}
{% elif data.choice == 'ELIT' %} {% elif data.choice == 'ELIT' %}
@ -40,8 +37,7 @@ Adressenbestandteil frei gewählt: {{data.other}}
Wikimedia-Projekt: {{data.project}} Wikimedia-Projekt: {{data.project}}
Persönliche Daten: {{data.data}} Persönliche Daten: {{data.data}}
Variante: {{data.variant}} Variante: {{data.variant}}
Sendungsadrese: {{data.send_to}} Sendungsadrese: {{data.send_to}} {% endif %}
{% endif %}
Zum Genehmigen hier klicken: {{data.urlprefix}}{% url 'authorize' data.choice data.pk %} Zum Genehmigen hier klicken: {{data.urlprefix}}{% url 'authorize' data.choice data.pk %}
@ -50,6 +46,10 @@ Zu Ablehnen hier klicken: {{data.urlprefix}}{% url 'deny' data.choice data.pk %}
Stets zu Diensten, Deine Förderdatenbank Stets zu Diensten, Deine Förderdatenbank
{% comment %} {% comment %}
vielleicht brauchen wir das hier https://gist.github.com/martinsvoboda/1bf965a8c6037c0fe1a88d89ea822df6
alte mail: alte mail:
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>

View File

@ -166,6 +166,8 @@ class ExternView(CookieWizardView):
# add some data to context for mail templates # add some data to context for mail templates
data['pk'] = form.pk data['pk'] = form.pk
data['urlprefix'] = URLPREFIX data['urlprefix'] = URLPREFIX
data['grant'] = ('LIT', 'SOFT', 'ELIT', 'BIB', 'IFG')
data['DOMAIN'] = ('MAIL', 'LIST')
# we need to send the following mails here: # we need to send the following mails here:
context = { 'data': data } context = { 'data': data }