Added configuration options for imprint URL and contact email address

This commit is contained in:
Raphael Michel
2015-06-15 20:17:18 +02:00
parent 02c9e5fcae
commit e657fe6605
4 changed files with 26 additions and 0 deletions

View File

@@ -81,6 +81,14 @@ DEFAULTS = {
'default': None,
'type': datetime
},
'contact_mail': {
'default': None,
'type': str
},
'imprint_url': {
'default': None,
'type': str
},
'mail_from': {
'default': settings.MAIL_FROM,
'type': str

View File

@@ -142,6 +142,15 @@ class EventSettingsForm(SettingsForm):
label=_("Reservation period"),
help_text=_("The number of minutes the items in a user's card are reserved for this user."),
)
imprint_url = forms.URLField(
label=_("Imprint URL"),
required=False,
)
contact_mail = forms.EmailField(
label=_("Contact address"),
required=False,
help_text=_("Public email address for contacting the organizer")
)
mail_from = forms.EmailField(
label=_("Sender address"),
help_text=_("Sender address for outgoing e-mails")

View File

@@ -19,6 +19,8 @@
{% bootstrap_field sform.timezone layout="horizontal" %}
{% bootstrap_field sform.show_date_to layout="horizontal" %}
{% bootstrap_field sform.show_times layout="horizontal" %}
{% bootstrap_field sform.contact_mail layout="horizontal" %}
{% bootstrap_field sform.imprint_url layout="horizontal" %}
</fieldset>
<fieldset>
<legend>{% trans "Timeline" %}</legend>

View File

@@ -61,6 +61,13 @@
{% endblock %}
</div>
<footer>
{% if request.event.settings.contact_mail %}
<a href="mailto:{{ request.event.settings.contact_mail }}">{% trans "Contact event organizer" %}</a> &middot;
{% endif %}
{% if request.event.settings.imprint_url %}
<a href="{{ request.event.settings.imprint_url }}" target="_blank">{% trans "Imprint" %}</a>
&middot;
{% endif %}
{% with "href='http://pretix.eu'" as a_attr %}
{% blocktrans trimmed %}
powered by <a {{ a_attr }}>pretix</a>