2
0
forked from Wavyzz/dolibarr

Merge pull request #21894 from atm-lena/16.0_AddForceCombo_SelecttDolUserFunction

Add forcecombo parameter to select dol user function
This commit is contained in:
Laurent Destailleur
2022-08-26 19:12:22 +02:00
committed by GitHub

View File

@@ -1921,7 +1921,7 @@ class Form
* @return string HTML select string
* @see select_dolgroups()
*/
public function select_dolusers($selected = '', $htmlname = 'userid', $show_empty = 0, $exclude = null, $disabled = 0, $include = '', $enableonly = '', $force_entity = '0', $maxlength = 0, $showstatus = 0, $morefilter = '', $show_every = 0, $enableonlytext = '', $morecss = '', $noactive = 0, $outputmode = 0, $multiple = false)
public function select_dolusers($selected = '', $htmlname = 'userid', $show_empty = 0, $exclude = null, $disabled = 0, $include = '', $enableonly = '', $force_entity = '0', $maxlength = 0, $showstatus = 0, $morefilter = '', $show_every = 0, $enableonlytext = '', $morecss = '', $noactive = 0, $outputmode = 0, $multiple = false, $forcecombo = 0)
{
// phpcs:enable
global $conf, $user, $langs, $hookmanager;
@@ -2124,7 +2124,7 @@ class Form
}
$out .= '</select>';
if ($num) {
if ($num && !$forcecombo) {
// Enhance with select2
include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php';
$out .= ajax_combobox($htmlname);