From b33bcd930b67ba0a945afa177be448f755aae252 Mon Sep 17 00:00:00 2001 From: Aina Sitraka <35221835+aynsix@users.noreply.github.com> Date: Wed, 22 Jan 2025 13:34:11 +0300 Subject: [PATCH] save user filename choice when export (#4577) --- .../Phrasea/Controller/Prod/DownloadController.php | 4 ++++ templates/web/common/dialog_export.html.twig | 12 ++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/lib/Alchemy/Phrasea/Controller/Prod/DownloadController.php b/lib/Alchemy/Phrasea/Controller/Prod/DownloadController.php index 7fa80cfc72..6062be047c 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/DownloadController.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/DownloadController.php @@ -42,6 +42,10 @@ public function checkDownload(Request $request) $this->app->abort(403); } + if (!empty($request->request->get('type'))) { + $this->app['session']->set('download_name_type', $request->request->get('type')); + } + $lst = $request->request->get('lst'); $ssttid = $request->request->get('ssttid', ''); $subdefs = $request->request->get('obj', []); diff --git a/templates/web/common/dialog_export.html.twig b/templates/web/common/dialog_export.html.twig index 430dd912bf..73b5222054 100644 --- a/templates/web/common/dialog_export.html.twig +++ b/templates/web/common/dialog_export.html.twig @@ -61,11 +61,19 @@

{{ 'Nom des fichiers a l\'export' | trans }}