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, 'default': None,
'type': datetime 'type': datetime
}, },
'contact_mail': {
'default': None,
'type': str
},
'imprint_url': {
'default': None,
'type': str
},
'mail_from': { 'mail_from': {
'default': settings.MAIL_FROM, 'default': settings.MAIL_FROM,
'type': str 'type': str

View File

@@ -142,6 +142,15 @@ class EventSettingsForm(SettingsForm):
label=_("Reservation period"), label=_("Reservation period"),
help_text=_("The number of minutes the items in a user's card are reserved for this user."), 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( mail_from = forms.EmailField(
label=_("Sender address"), label=_("Sender address"),
help_text=_("Sender address for outgoing e-mails") help_text=_("Sender address for outgoing e-mails")

View File

@@ -19,6 +19,8 @@
{% bootstrap_field sform.timezone layout="horizontal" %} {% bootstrap_field sform.timezone layout="horizontal" %}
{% bootstrap_field sform.show_date_to layout="horizontal" %} {% bootstrap_field sform.show_date_to layout="horizontal" %}
{% bootstrap_field sform.show_times 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>
<fieldset> <fieldset>
<legend>{% trans "Timeline" %}</legend> <legend>{% trans "Timeline" %}</legend>

View File

@@ -61,6 +61,13 @@
{% endblock %} {% endblock %}
</div> </div>
<footer> <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 %} {% with "href='http://pretix.eu'" as a_attr %}
{% blocktrans trimmed %} {% blocktrans trimmed %}
powered by <a {{ a_attr }}>pretix</a> powered by <a {{ a_attr }}>pretix</a>