Added a custom welcome text

This commit is contained in:
Raphael Michel
2016-07-30 13:06:41 +02:00
parent 825b985f81
commit 60c10485d1
5 changed files with 14 additions and 0 deletions

View File

@@ -221,6 +221,10 @@ Your {event} team"""))
'default': None,
'type': File
},
'frontpage_text': {
'default': '',
'type': LazyI18nString
}
}

View File

@@ -367,6 +367,11 @@ class DisplaySettingsForm(SettingsForm):
help_text=_('If you provide a logo image, we will by default not show your events name and date '
'in the page header. We will show your logo with a maximal height of 120 pixels.')
)
frontpage_text = I18nFormField(
label=_("Frontpage text"),
required=False,
widget=I18nTextarea
)
class TicketSettingsForm(SettingsForm):

View File

@@ -9,6 +9,7 @@
<legend>{% trans "Display settings" %}</legend>
{% bootstrap_field form.primary_color layout="horizontal" %}
{% bootstrap_field form.logo_image layout="horizontal" %}
{% bootstrap_field form.frontpage_text layout="horizontal" %}
</fieldset>
<div class="form-group submit-group">
<button type="submit" class="btn btn-primary btn-save">

View File

@@ -50,6 +50,9 @@
{% endif %}
</div>
{% endif %}
{% if frontpage_text %}
{{ frontpage_text|linebreaks }}
{% endif %}
{% if event.presale_is_running or event.settings.show_items_outside_presale_period %}
<form method="post" data-asynctask
action="{% eventurl request.event "presale:event.cart.add" %}?next={{ request.path|urlencode }}">

View File

@@ -72,4 +72,5 @@ class EventIndex(EventViewMixin, CartMixin, TemplateView):
context['vouchers_exist'] = vouchers_exist
context['cart'] = self.get_cart()
context['frontpage_text'] = str(self.request.event.settings.frontpage_text)
return context