From b05fa89010abbd60541e5dd99017b84dbb24f293 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Sun, 13 Mar 2022 13:13:43 +0100 Subject: [PATCH] PDF editor: Allow button to download current background --- src/pretix/control/templates/pretixcontrol/pdf/index.html | 8 ++++++++ src/pretix/static/pretixcontrol/js/ui/editor.js | 1 + 2 files changed, 9 insertions(+) diff --git a/src/pretix/control/templates/pretixcontrol/pdf/index.html b/src/pretix/control/templates/pretixcontrol/pdf/index.html index c258bab304..e829f9adb3 100644 --- a/src/pretix/control/templates/pretixcontrol/pdf/index.html +++ b/src/pretix/control/templates/pretixcontrol/pdf/index.html @@ -204,6 +204,14 @@ {% endblocktrans %}

+
+

+ + + {% trans "Download current background" %} + +

+
diff --git a/src/pretix/static/pretixcontrol/js/ui/editor.js b/src/pretix/static/pretixcontrol/js/ui/editor.js index 372b09211e..2f5fdb44f0 100644 --- a/src/pretix/static/pretixcontrol/js/ui/editor.js +++ b/src/pretix/static/pretixcontrol/js/ui/editor.js @@ -827,6 +827,7 @@ var editor = { d = editor.dump(); editor.fabric.dispose(); editor._load_pdf(d); + $(".background-download-button").attr("href", url); }, _source_show: function () {