diff --git a/src/pretix/control/templates/pretixcontrol/items/question_delete.html b/src/pretix/control/templates/pretixcontrol/items/question_delete.html index 36aaf3e88a..5119a58de4 100644 --- a/src/pretix/control/templates/pretixcontrol/items/question_delete.html +++ b/src/pretix/control/templates/pretixcontrol/items/question_delete.html @@ -8,9 +8,13 @@ {% csrf_token %}

{% blocktrans %}Are you sure you want to delete the question {{ question }}?{% endblocktrans %}

{% if dependent|length > 0 %} -

{% blocktrans %}All answers to the question given by the buyers of the following products will be lost.{% endblocktrans %}

+
+

{% blocktrans %}All answers to the question given by the buyers of the following products will be lost.{% endblocktrans %} + {% blocktrans with url=edit_url|add:"#tab-0-1-open" %}If you want to keep the answers, edit the question and set it to hidden.{% endblocktrans %} +

+
{% for item in dependent %} -
  • {{ item.name }}
  • +
  • {{ item }}
  • {% endfor %} {% endif %}
    @@ -18,7 +22,7 @@ {% trans "Cancel" %}
    diff --git a/src/pretix/control/views/item.py b/src/pretix/control/views/item.py index 02deb3fc65..e1fa7aece9 100644 --- a/src/pretix/control/views/item.py +++ b/src/pretix/control/views/item.py @@ -573,6 +573,11 @@ class QuestionDelete(EventPermissionRequiredMixin, CompatDeleteView): def get_context_data(self, *args, **kwargs) -> dict: context = super().get_context_data(*args, **kwargs) context['dependent'] = list(self.get_object().items.all()) + context['edit_url'] = reverse('control:event.items.questions.edit', kwargs={ + 'organizer': self.request.event.organizer.slug, + 'event': self.request.event.slug, + 'question': self.get_object().pk, + }) return context @transaction.atomic