Browse Source

some changes (sorry, i lost track)

master
Benni Baermann 4 years ago
parent
commit
c7bde110a7
4 changed files with 36 additions and 11 deletions
  1. +23
    -0
      input/migrations/0030_auto_20201027_1337.py
  2. +2
    -2
      input/models.py
  3. +9
    -9
      input/templates/input/if_mail.txt
  4. +2
    -0
      input/views.py

+ 23
- 0
input/migrations/0030_auto_20201027_1337.py 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'),
),
]

+ 2
- 2
input/models.py 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='')

+ 9
- 9
input/templates/input/if_mail.txt 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
{% else %} ERROR UNKNOWN FORMTYPE {% endif %} an.
{% elif data.choice == 'LIST' %} Mailingliste {% 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 %}
{% if data.choice in ('MAIL', 'LIST') %}
{% endif %} {% if data.choice in data.domain %}
Domain: {{data.domain}} Domain: {{data.domain}}
Adressenbestandteil: {{data.address}} Adressenbestandteil: {{data.address}}
{% endif %}
{% if data.choice == 'BIB' %}
{% endif %} {% 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}}
{% endif %}
Sendungsadrese: {{data.send_to}} {% 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>

+ 2
- 0
input/views.py 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 }

Loading…
Cancel
Save