Order-level questions (#6471)

* New CheckoutSession model, created and deleted throught cart lifetime but only used for order-level question answers so far
* Order-level QuestionAnswers (relations to CheckoutSession / Order)
* New container_type field on Question model to specify whether Question belongs to order or orderposition
* Order-level questions are currently experimental, UI is hidden behind feature flag

---------

Co-authored-by: Richard Schreiber <schreiber@pretix.eu>
This commit is contained in:
luelista
2026-08-14 14:56:45 +02:00
committed by GitHub
co-authored by Richard Schreiber
parent b241adb7d0
commit f8cc31b120
37 changed files with 1229 additions and 716 deletions
@@ -131,7 +131,8 @@ $(function () {
$val.parent().append("<div class=\"help-block loading-indicator\"><span class=\"fa" +
" fa-cog fa-spin\"></span></div>");
apiGET('/api/v1/organizers/' + $("body").attr("data-organizer") + '/events/' + $("body").attr("data-event") + '/questions/' + val + '/', function (data) {
// the container_type parameter is undocumented. this API is going to change in a later release.
apiGET('/api/v1/organizers/' + $("body").attr("data-organizer") + '/events/' + $("body").attr("data-event") + '/questions/' + val + '/?container_type=' + encodeURIComponent($dq.data('container-type')), function (data) {
if (data.type === "B") {
$val.append($("<option>").attr("value", "True").text(gettext("Yes")));
$val.append($("<option>").attr("value", "False").text(gettext("No")));