From a5903abb5b3472d1664fda2e7ca960974e08a2bb Mon Sep 17 00:00:00 2001 From: Adrien Raze Date: Tue, 25 Jan 2022 11:28:36 +0100 Subject: [PATCH] FIX : Change display of the bom's select --- htdocs/core/class/html.form.class.php | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index fe47047150d..e7fd8d27967 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -2376,20 +2376,28 @@ class Form * @param string $morecss Add more css on select * @return void|string */ - public function select_bom($selected = '', $htmlname = 'bom_id', $limit = 0, $status = 1, $type = 1, $showempty = '1', $morecss = '', $nooutput = '') + public function select_bom($selected = '', $htmlname = 'bom_id', $limit = 0, $status = 1, $type = 1, $showempty = '1', $morecss = '', $nooutput = '', $forcecombo = 0) { // phpcs:enable global $conf, $user, $langs, $db; + + require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; + $error = 0; $out = ''; + if (!$forcecombo) { + include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php'; + $out .= ajax_combobox($htmlname, $events, getDolGlobalInt("PRODUIT_USE_SEARCH_TO_SELECT")); + } + $out .= '