From 097de7b3cd934e67a00cb0a9c82bc02e6c47d838 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 11 May 2020 18:34:54 +0200 Subject: [PATCH] Only add empty select if no multiselect --- htdocs/core/class/html.formactions.class.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php index 8aa51a66ab7..398e2b8a235 100644 --- a/htdocs/core/class/html.formactions.class.php +++ b/htdocs/core/class/html.formactions.class.php @@ -353,10 +353,13 @@ class FormActions require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php'; $caction = new CActionComm($this->db); - // Suggest a list with manual events or all auto events - $arraylist = $caction->liste_array(1, 'code', $excludetype, $onlyautoornot); - array_unshift($arraylist, ' '); // Add empty line at start - //asort($arraylist); + // Suggest a list with manual events or all auto events + $arraylist = $caction->liste_array(1, 'code', $excludetype, $onlyautoornot); + if (empty($multiselect)) { + // Add empty line at start only if no multiselect + array_unshift($arraylist, ' '); + } + //asort($arraylist); if ($selected == 'manual') $selected = 'AC_OTH'; if ($selected == 'auto') $selected = 'AC_OTH_AUTO';