diff --git a/src/pretix/control/forms/orders.py b/src/pretix/control/forms/orders.py index 609c83b7a7..bf06e96b21 100644 --- a/src/pretix/control/forms/orders.py +++ b/src/pretix/control/forms/orders.py @@ -517,6 +517,20 @@ class OrderMailForm(forms.Form): self._set_field_placeholders('message', ['event', 'order']) +class OrderPositionMailForm(OrderMailForm): + def __init__(self, *args, **kwargs): + position = self.position = kwargs.pop('position') + super().__init__(*args, **kwargs) + self.fields['sendto'].initial = position.attendee_email + self.fields['message'] = forms.CharField( + label=_("Message"), + required=True, + widget=forms.Textarea, + initial=self.order.event.settings.mail_text_order_custom_mail.localize(self.order.locale), + ) + self._set_field_placeholders('message', ['event', 'order', 'position']) + + class OrderRefundForm(forms.Form): action = forms.ChoiceField( required=False, diff --git a/src/pretix/control/templates/pretixcontrol/order/index.html b/src/pretix/control/templates/pretixcontrol/order/index.html index 41325dd689..2675a10bc0 100644 --- a/src/pretix/control/templates/pretixcontrol/order/index.html +++ b/src/pretix/control/templates/pretixcontrol/order/index.html @@ -182,7 +182,7 @@ {{ order.email|default_if_none:"" }} {% if order.email and order.email_known_to_work %} - {% endif %} + {% endif %} @@ -388,8 +388,12 @@ {{ line.attendee_email }} {% if not line.addon_to %}