Skip to content

Commit e3789b6

Browse files
aynsixnmaillat
andauthored
case download_async (#4583)
Co-authored-by: Nicolas Maillat <[email protected]>
1 parent 30a8029 commit e3789b6

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

lib/Alchemy/Phrasea/Controller/Prod/DownloadController.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,10 @@ public function listDownloadAsync(Request $request)
105105
$this->app->abort(403);
106106
}
107107

108+
if (!empty($request->request->get('type'))) {
109+
$this->app['session']->set('download_name_type', $request->request->get('type'));
110+
}
111+
108112
$lst = $request->request->get('lst');
109113
$ssttid = $request->request->get('ssttid', '');
110114
$subdefs = $request->request->get('obj', []);

templates/web/common/dialog_export.html.twig

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,17 @@
6060
<div class="buttons_line" style="display:{% if choose_export_title %}{% else %}none{% endif %}; text-align: left;">
6161
<p>{{ 'Nom des fichiers a l\'export' | trans }}</p>
6262
<div class="well-small">
63-
<label for="type_{{id}}_original" class="radio">
64-
<input type="radio" name="type" id="type_{{id}}_original"
63+
<label for="type_{{id}}_title" class="radio">
64+
<input type="radio" name="type" id="type_{{id}}_title"
6565
{% if (app['session'].has('download_name_type') and app['session'].get('download_name_type') == "title") or (not app['session'].has('download_name_type') and default_export_title == "title" ) %}
6666
checked
6767
{% endif %}
6868
value="title" />
6969
{{ 'export::titre: titre du documument' | trans }}
7070
</label>
71-
<label for="type_{{id}}_title" class="radio">
72-
<input type="radio" name="type" id="type_{{id}}_title"
71+
72+
<label for="type_{{id}}_original" class="radio">
73+
<input type="radio" name="type" id="type_{{id}}_original"
7374
{% if (app['session'].has('download_name_type') and app['session'].get('download_name_type') == "originalname") or (not app['session'].has('download_name_type') and default_export_title == "original" ) %}
7475
checked
7576
{% endif %}

0 commit comments

Comments
 (0)