diff --git a/src/pretix/base/forms/questions.py b/src/pretix/base/forms/questions.py index d2469800ac..4e3280fff8 100644 --- a/src/pretix/base/forms/questions.py +++ b/src/pretix/base/forms/questions.py @@ -214,6 +214,10 @@ def guess_country(event): return country +class QuestionCheckboxSelectMultiple(forms.CheckboxSelectMultiple): + option_template_name = 'pretixbase/forms/widgets/checkbox_option_with_links.html' + + class BaseQuestionsForm(forms.Form): """ This form class is responsible for asking order-related questions. This includes @@ -332,7 +336,7 @@ class BaseQuestionsForm(forms.Form): label=label, required=required, help_text=help_text, to_field_name='identifier', - widget=forms.CheckboxSelectMultiple, + widget=QuestionCheckboxSelectMultiple, initial=initial.options.all() if initial else None, ) elif q.type == Question.TYPE_FILE: diff --git a/src/pretix/base/templates/pretixbase/forms/widgets/checkbox_option_with_links.html b/src/pretix/base/templates/pretixbase/forms/widgets/checkbox_option_with_links.html new file mode 100644 index 0000000000..4f27e34c85 --- /dev/null +++ b/src/pretix/base/templates/pretixbase/forms/widgets/checkbox_option_with_links.html @@ -0,0 +1,2 @@ +{% load rich_text %} +{% if widget.wrap_label %}{% endif %}{% include "django/forms/widgets/input.html" %}{% if widget.wrap_label %} {{ widget.label|rich_text_snippet }}{% endif %} diff --git a/src/pretix/control/templates/pretixcontrol/order/index.html b/src/pretix/control/templates/pretixcontrol/order/index.html index d51bb00aa1..9f5ff404dc 100644 --- a/src/pretix/control/templates/pretixcontrol/order/index.html +++ b/src/pretix/control/templates/pretixcontrol/order/index.html @@ -3,6 +3,7 @@ {% load bootstrap3 %} {% load eventurl %} {% load money %} +{% load rich_text %} {% load safelink %} {% load eventsignal %} {% block title %} @@ -377,6 +378,8 @@ {% endif %} + {% elif q.type == "M" %} + {{ q.answer|rich_text_snippet }} {% else %} {{ q.answer|linebreaksbr }} {% endif %} diff --git a/src/pretix/presale/templates/pretixpresale/event/fragment_cart.html b/src/pretix/presale/templates/pretixpresale/event/fragment_cart.html index 728957ee3e..7e309b0433 100644 --- a/src/pretix/presale/templates/pretixpresale/event/fragment_cart.html +++ b/src/pretix/presale/templates/pretixpresale/event/fragment_cart.html @@ -1,6 +1,7 @@ {% load i18n %} {% load eventurl %} {% load safelink %} +{% load rich_text %} {% load money %} {% blocktrans asvar s_taxes %}taxes{% endblocktrans %} {% for line in cart.positions %} @@ -59,6 +60,8 @@ {{ q.answer.file_name }} + {% elif q.type == "M" %} + {{ q.answer|rich_text_snippet }} {% else %} {{ q.answer|linebreaksbr }} {% endif %}