From e9de12ec510847bd2e672cc696442247a0c8ba25 Mon Sep 17 00:00:00 2001 From: Ferran Recio Date: Wed, 16 Mar 2022 11:02:56 +0100 Subject: [PATCH] MDL-74153 portfolio_download: fix download form The download form usas autosubmit to start downloading the content. This breaks the JS modules loading because the page loading is cancelled when the form is submitted. To prevent this from happen the download form now has a hidden iframe to execute the download action without affecting the rest of the page. --- portfolio/download/file.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/portfolio/download/file.php b/portfolio/download/file.php index 776ca5c493e..0372b0eb4f2 100644 --- a/portfolio/download/file.php +++ b/portfolio/download/file.php @@ -29,9 +29,11 @@ echo $OUTPUT->notification('' . get_string('returnt // if they don't have javascript, they can submit the form here to get the file. // if they do, it does it nicely for them. echo '
-
+ -
+ + + '; $PAGE->requires->js_amd_inline(" @@ -41,5 +43,3 @@ require(['jquery'], function($) { }).submit(); });"); echo $OUTPUT->footer(); - -