mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
Moved sender and prefix settings to mail page
This commit is contained in:
@@ -10,7 +10,7 @@ from django.utils import translation
|
|||||||
from django.utils.formats import date_format, number_format
|
from django.utils.formats import date_format, number_format
|
||||||
from django.utils.safestring import mark_safe
|
from django.utils.safestring import mark_safe
|
||||||
from django.utils.translation import ugettext
|
from django.utils.translation import ugettext
|
||||||
from typing import Dict, List, Union, Optional
|
from typing import Dict, List, Optional, Union
|
||||||
|
|
||||||
|
|
||||||
class LazyI18nString:
|
class LazyI18nString:
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ from django.conf import settings
|
|||||||
from django.db import transaction
|
from django.db import transaction
|
||||||
from django.utils.timezone import now
|
from django.utils.timezone import now
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
from pretix.base.i18n import LazyDate, LazyNumber
|
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
|
from pretix.base.i18n import LazyDate, LazyNumber
|
||||||
from pretix.base.models import (
|
from pretix.base.models import (
|
||||||
CartPosition, Event, EventLock, Order, OrderPosition, Quota, User,
|
CartPosition, Event, EventLock, Order, OrderPosition, Quota, User,
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -148,16 +148,6 @@ class EventSettingsForm(SettingsForm):
|
|||||||
required=False,
|
required=False,
|
||||||
help_text=_("Public email address for contacting the organizer")
|
help_text=_("Public email address for contacting the organizer")
|
||||||
)
|
)
|
||||||
mail_prefix = forms.CharField(
|
|
||||||
label=_("Subject prefix"),
|
|
||||||
help_text=_("This will be prepended to the subject of all outgoing emails. This could be a short form of "
|
|
||||||
"your event name."),
|
|
||||||
required=False
|
|
||||||
)
|
|
||||||
mail_from = forms.EmailField(
|
|
||||||
label=_("Sender address"),
|
|
||||||
help_text=_("Sender address for outgoing e-mails")
|
|
||||||
)
|
|
||||||
|
|
||||||
def clean(self):
|
def clean(self):
|
||||||
data = super().clean()
|
data = super().clean()
|
||||||
@@ -200,6 +190,16 @@ class ProviderForm(SettingsForm):
|
|||||||
|
|
||||||
|
|
||||||
class MailSettingsForm(SettingsForm):
|
class MailSettingsForm(SettingsForm):
|
||||||
|
mail_prefix = forms.CharField(
|
||||||
|
label=_("Subject prefix"),
|
||||||
|
help_text=_("This will be prepended to the subject of all outgoing emails. This could be a short form of "
|
||||||
|
"your event name."),
|
||||||
|
required=False
|
||||||
|
)
|
||||||
|
mail_from = forms.EmailField(
|
||||||
|
label=_("Sender address"),
|
||||||
|
help_text=_("Sender address for outgoing e-mails")
|
||||||
|
)
|
||||||
mail_text_order_placed = I18nFormField(
|
mail_text_order_placed = I18nFormField(
|
||||||
label=_("Placed order"),
|
label=_("Placed order"),
|
||||||
required=False,
|
required=False,
|
||||||
|
|||||||
@@ -4,9 +4,14 @@
|
|||||||
{% block inside %}
|
{% block inside %}
|
||||||
<form action="" method="post" class="form-horizontal" enctype="multipart/form-data">
|
<form action="" method="post" class="form-horizontal" enctype="multipart/form-data">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
|
{% bootstrap_form_errors form %}
|
||||||
|
<fieldset>
|
||||||
|
<legend>{% trans "E-mail settings" %}</legend>
|
||||||
|
{% bootstrap_field form.mail_prefix layout="horizontal" %}
|
||||||
|
{% bootstrap_field form.mail_from layout="horizontal" %}
|
||||||
|
</fieldset>
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>{% trans "E-mail content" %}</legend>
|
<legend>{% trans "E-mail content" %}</legend>
|
||||||
{% bootstrap_form_errors form %}
|
|
||||||
{% bootstrap_field form.mail_text_order_placed layout="horizontal" %}
|
{% bootstrap_field form.mail_text_order_placed layout="horizontal" %}
|
||||||
{% bootstrap_field form.mail_text_order_paid layout="horizontal" %}
|
{% bootstrap_field form.mail_text_order_paid layout="horizontal" %}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|||||||
@@ -42,11 +42,6 @@
|
|||||||
{% bootstrap_field sform.attendee_names_asked layout="horizontal" %}
|
{% bootstrap_field sform.attendee_names_asked layout="horizontal" %}
|
||||||
{% bootstrap_field sform.attendee_names_required layout="horizontal" %}
|
{% bootstrap_field sform.attendee_names_required layout="horizontal" %}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<fieldset>
|
|
||||||
<legend>{% trans "E-Mail settings" %}</legend>
|
|
||||||
{% bootstrap_field sform.mail_prefix layout="horizontal" %}
|
|
||||||
{% bootstrap_field sform.mail_from layout="horizontal" %}
|
|
||||||
</fieldset>
|
|
||||||
<div class="form-group submit-group">
|
<div class="form-group submit-group">
|
||||||
<button type="submit" class="btn btn-primary btn-save">
|
<button type="submit" class="btn btn-primary btn-save">
|
||||||
{% trans "Save" %}
|
{% trans "Save" %}
|
||||||
|
|||||||
Reference in New Issue
Block a user