From 4761671fc8f40024f0f334b3a5611b7b8a710e26 Mon Sep 17 00:00:00 2001 From: simicar29 <53998265+simicar29@users.noreply.github.com> Date: Fri, 24 Jan 2020 09:41:22 +0100 Subject: [PATCH] Add Hook doPreMassActions Add Hook doPreMassActions to allow dedicated form display for custom mass actions --- htdocs/core/tpl/massactions_pre.tpl.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/htdocs/core/tpl/massactions_pre.tpl.php b/htdocs/core/tpl/massactions_pre.tpl.php index a0c627ac049..bc040e1274d 100644 --- a/htdocs/core/tpl/massactions_pre.tpl.php +++ b/htdocs/core/tpl/massactions_pre.tpl.php @@ -166,3 +166,13 @@ if ($massaction == 'presend') dol_fiche_end(); } +// Allow Pre-Mass-Action hook (eg for confirmation dialog) +$parameters['toselect']=$toselect; +$parameters['uploaddir']=$uploaddir; + +$reshook=$hookmanager->executeHooks('doPreMassActions',$parameters, $object, $action); +if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} else { + print $hookmanager->resPrint; +}