mirror of
https://github.com/pretix/pretix.git
synced 2026-09-13 16:14:40 +00:00
Introduce banner text
This commit is contained in:
@@ -532,6 +532,7 @@ class EventSettingsSerializer(serializers.Serializer):
|
|||||||
'checkout_email_helptext',
|
'checkout_email_helptext',
|
||||||
'presale_has_ended_text',
|
'presale_has_ended_text',
|
||||||
'voucher_explanation_text',
|
'voucher_explanation_text',
|
||||||
|
'banner_text',
|
||||||
'show_dates_on_frontpage',
|
'show_dates_on_frontpage',
|
||||||
'show_date_to',
|
'show_date_to',
|
||||||
'show_times',
|
'show_times',
|
||||||
|
|||||||
@@ -1469,6 +1469,19 @@ Your {event} team"""))
|
|||||||
widget=I18nTextarea
|
widget=I18nTextarea
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
'banner_text': {
|
||||||
|
'default': '',
|
||||||
|
'type': LazyI18nString,
|
||||||
|
'serializer_class': I18nField,
|
||||||
|
'form_class': I18nFormField,
|
||||||
|
'form_kwargs': dict(
|
||||||
|
label=_("Banner text"),
|
||||||
|
widget=I18nTextarea,
|
||||||
|
widget_kwargs={'attrs': {'rows': '2'}},
|
||||||
|
help_text=_("This text will be shown above and below every page of your shop. Please only use this for "
|
||||||
|
"very important messages.")
|
||||||
|
)
|
||||||
|
},
|
||||||
'voucher_explanation_text': {
|
'voucher_explanation_text': {
|
||||||
'default': '',
|
'default': '',
|
||||||
'type': LazyI18nString,
|
'type': LazyI18nString,
|
||||||
|
|||||||
@@ -520,6 +520,7 @@ class EventSettingsForm(SettingsForm):
|
|||||||
'attendee_addresses_asked',
|
'attendee_addresses_asked',
|
||||||
'attendee_addresses_required',
|
'attendee_addresses_required',
|
||||||
'confirm_text',
|
'confirm_text',
|
||||||
|
'banner_text',
|
||||||
'order_email_asked_twice',
|
'order_email_asked_twice',
|
||||||
'last_order_modification_date',
|
'last_order_modification_date',
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -101,6 +101,7 @@
|
|||||||
{% bootstrap_field sform.voucher_explanation_text layout="control" %}
|
{% bootstrap_field sform.voucher_explanation_text layout="control" %}
|
||||||
{% bootstrap_field sform.confirm_text layout="control" %}
|
{% bootstrap_field sform.confirm_text layout="control" %}
|
||||||
{% bootstrap_field sform.checkout_email_helptext layout="control" %}
|
{% bootstrap_field sform.checkout_email_helptext layout="control" %}
|
||||||
|
{% bootstrap_field sform.banner_text layout="control" %}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>{% trans "Shop design" %}</legend>
|
<legend>{% trans "Shop design" %}</legend>
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
{% load thumb %}
|
{% load thumb %}
|
||||||
{% load eventurl %}
|
{% load eventurl %}
|
||||||
{% load safelink %}
|
{% load safelink %}
|
||||||
|
{% load rich_text %}
|
||||||
{% block thetitle %}
|
{% block thetitle %}
|
||||||
{% block title %}{% endblock %}{% if url_name != "event.index" %} :: {% endif %}{{ event.name }}
|
{% block title %}{% endblock %}{% if url_name != "event.index" %} :: {% endif %}{{ event.name }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@@ -112,8 +113,14 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if request.event.settings.banner_text %}
|
||||||
|
{{ request.event.settings.banner_text|rich_text }}
|
||||||
|
{% endif %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
{% if request.event.settings.banner_text %}
|
||||||
|
{{ request.event.settings.banner_text|rich_text }}
|
||||||
|
{% endif %}
|
||||||
{% if request.event.testmode %}
|
{% if request.event.testmode %}
|
||||||
{% if request.sales_channel.testmode_supported %}
|
{% if request.sales_channel.testmode_supported %}
|
||||||
<div class="alert alert-testmode alert-warning">
|
<div class="alert alert-testmode alert-warning">
|
||||||
|
|||||||
Reference in New Issue
Block a user