mirror of
https://github.com/pretix/pretix.git
synced 2026-05-04 15:04:03 +00:00
* Integrated PlaceholderValidator to MailForm at plugins/sendmail * Integrated PlaceholderValidator to MailForm and MailSettingsForm * Typo
This commit is contained in:
committed by
Raphael Michel
parent
990d5815f2
commit
bd5337a2c2
@@ -2,6 +2,7 @@ from django import forms
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from i18nfield.forms import I18nFormField, I18nTextarea, I18nTextInput
|
||||
|
||||
from pretix.base.forms import PlaceholderValidator
|
||||
from pretix.base.models import Order
|
||||
|
||||
|
||||
@@ -21,7 +22,9 @@ class MailForm(forms.Form):
|
||||
widget=I18nTextarea, required=True,
|
||||
locales=event.settings.get('locales'),
|
||||
help_text=_("Available placeholders: {due_date}, {event}, {order}, {order_date}, {order_url}, "
|
||||
"{invoice_name}, {invoice_company}")
|
||||
"{invoice_name}, {invoice_company}"),
|
||||
validators=[PlaceholderValidator(['{due_date}', '{event}', '{order}', '{order_date}', '{order_url}',
|
||||
'{invoice_name}', '{invoice_company}'])]
|
||||
)
|
||||
choices = list(Order.STATUS_CHOICE)
|
||||
if not event.settings.get('payment_term_expire_automatically', as_type=bool):
|
||||
|
||||
Reference in New Issue
Block a user