From bb94d87ec47ee23365eee56adfc829cde0792887 Mon Sep 17 00:00:00 2001 From: Zuzanna Ludzik Date: Mon, 3 Aug 2026 13:14:44 +0200 Subject: [PATCH] #2024 can print whole form as participant --- www/form/app-form.less | 12 ++++++++++++ www/form/inner.js | 16 ---------------- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/www/form/app-form.less b/www/form/app-form.less index 37cd22686..b7bc93cb5 100644 --- a/www/form/app-form.less +++ b/www/form/app-form.less @@ -1553,3 +1553,15 @@ .charts_main(); } +@media print { + html, + body { + height: auto !important; + overflow: visible !important; + } + + .cp-form-creator-container { + max-height: none !important; + overflow-y: visible !important + } +} \ No newline at end of file diff --git a/www/form/inner.js b/www/form/inner.js index a99b2d194..22980e887 100644 --- a/www/form/inner.js +++ b/www/form/inner.js @@ -131,24 +131,8 @@ define([ var nativePrint = window.print.bind(window); var printFullContent = function () { - var target = document.querySelector('.cp-form-creator-container'); - if (!target) { nativePrint(); return; } - - var prevHeight = target.style.height; - var prevOverflow = target.style.overflow; - var prevOverflowY = target.style.overflowY; - var prevMaxHeight = target.style.maxHeight; - - target.style.setProperty('height', 'auto', 'important'); - target.style.setProperty('max-height', 'none', 'important'); - target.style.setProperty('overflow', 'visible', 'important'); - target.style.setProperty('overflow-y', 'visible', 'important'); var restore = function () { - target.style.height = prevHeight; - target.style.overflow = prevOverflow; - target.style.overflowY = prevOverflowY; - target.style.maxHeight = prevMaxHeight; window.onafterprint = null; };