diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php index d6cf08594bb..4f0439d7b3c 100644 --- a/htdocs/core/class/html.formother.class.php +++ b/htdocs/core/class/html.formother.class.php @@ -356,9 +356,18 @@ class FormOther global $conf,$langs; $langs->load('users'); + $out = ''; + $nodatarole = ''; + // Enhance with select2 + if ($conf->use_javascript_ajax) + { + include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php'; + $out.= ajax_combobox($htmlname); + $nodatarole=' data-role="none"'; + } // Select each sales and print them in a select input - $moreforfilter =''; + $out.=''; // Get list of users allowed to be viewed $sql_usr = "SELECT u.rowid, u.lastname, u.firstname, u.statut, u.login"; @@ -383,34 +392,35 @@ class FormOther { while ($obj_usr = $this->db->fetch_object($resql_usr)) { - $moreforfilter.=''; + $out.=($moreinfo?')':''); + $out.=''; } $this->db->free($resql_usr); } @@ -418,9 +428,9 @@ class FormOther { dol_print_error($this->db); } - $moreforfilter.=''; + $out.=''; - return $moreforfilter; + return $out; } /**