forked from CGM_Public/pretix_original
Added a custom welcome text
This commit is contained in:
@@ -221,6 +221,10 @@ Your {event} team"""))
|
||||
'default': None,
|
||||
'type': File
|
||||
},
|
||||
'frontpage_text': {
|
||||
'default': '',
|
||||
'type': LazyI18nString
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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 }}">
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user