From 0cb9fe124177c8471733ef307d28ed00e7f031f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 16 Nov 2024 00:15:13 +0100 Subject: [PATCH] fix select unit (#31868) * fix select unit * Update html.formproduct.class.php --- htdocs/product/class/html.formproduct.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/product/class/html.formproduct.class.php b/htdocs/product/class/html.formproduct.class.php index 8176e2296628f..bc8a42046a27f 100644 --- a/htdocs/product/class/html.formproduct.class.php +++ b/htdocs/product/class/html.formproduct.class.php @@ -576,6 +576,7 @@ public function selectMeasuringUnits($name = 'measuring_units', $measuring_style $langs->load("other"); $return = ''; + $placeholderID = ($mode == 2 ? '99999999' : '-1'); // we don't want ajaxcombobox replace clearing option in mode 2 // TODO Use a cache require_once DOL_DOCUMENT_ROOT.'/core/class/cunits.class.php'; @@ -631,7 +632,7 @@ public function selectMeasuringUnits($name = 'measuring_units', $measuring_style $return .= ''; } - $return .= ajax_combobox($name); + $return .= ajax_combobox($name, [], 0, 0, 'resolve', $placeholderID); return $return; }