Fix eMail-previews for per-attendant emails

This commit is contained in:
Martin Gross
2019-08-28 16:48:59 +02:00
parent fce9117dfd
commit 2559439c4e

View File

@@ -53,8 +53,8 @@ from pretix.multidomain.urlreverse import get_domain
from pretix.plugins.stripe.payment import StripeSettingsHolder
from pretix.presale.style import regenerate_css
from ..logdisplay import OVERVIEW_BLACKLIST
from . import CreateView, PaginationMixin, UpdateView
from ..logdisplay import OVERVIEW_BLACKLIST
class EventSettingsViewMixin:
@@ -570,8 +570,11 @@ class MailSettingsPreview(EventPermissionRequiredMixin, View):
kv = {
'mail_text_order_placed': ['total', 'currency', 'date', 'invoice_company', 'total_with_currency',
'event', 'payment_info', 'url', 'invoice_name'],
'mail_text_order_placed_attendee': ['event', 'url', 'attendee_name'],
'mail_text_order_paid': ['event', 'url', 'invoice_name', 'invoice_company', 'payment_info'],
'mail_text_order_paid_attendee': ['event', 'url', 'attendee_name'],
'mail_text_order_free': ['event', 'url', 'invoice_name', 'invoice_company'],
'mail_text_order_free_attendee': ['event', 'url', 'attendee_name'],
'mail_text_resend_link': ['event', 'url', 'invoice_name', 'invoice_company'],
'mail_text_resend_all_links': ['event', 'orders'],
'mail_text_order_changed': ['event', 'url', 'invoice_name', 'invoice_company'],
@@ -581,6 +584,7 @@ class MailSettingsPreview(EventPermissionRequiredMixin, View):
'mail_text_order_custom_mail': ['expire_date', 'event', 'code', 'date', 'url',
'invoice_name', 'invoice_company'],
'mail_text_download_reminder': ['event', 'url'],
'mail_text_download_reminder_attendee': ['attendee_name', 'event', 'url'],
'mail_text_order_placed_require_approval': ['total', 'currency', 'date', 'invoice_company',
'total_with_currency', 'event', 'url', 'invoice_name'],
'mail_text_order_approved': ['total', 'currency', 'date', 'invoice_company',
@@ -615,8 +619,9 @@ class MailSettingsPreview(EventPermissionRequiredMixin, View):
'code': '68CYU2H6ZTP3WLK5',
'invoice_name': _('John Doe'),
'invoice_company': _('Sample Corporation'),
'common': _('An individial text with a reason can be inserted here.'),
'common': _('An individual text with a reason can be inserted here.'),
'payment_info': _('Please transfer money to this bank account: 9999-9999-9999-9999'),
'attendee_name': _('John Doe'),
}
for k, v in self.request.event.meta_data.items():
d['meta_' + k] = v