2
0
forked from Wavyzz/dolibarr

Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into

develop
This commit is contained in:
Laurent Destailleur
2024-04-12 19:24:31 +02:00
parent e414f06835
commit e5240123a1
2 changed files with 92 additions and 43 deletions

View File

@@ -1396,6 +1396,7 @@ class Form
* @param string[] $excludeids Exclude IDs from the select combo
* @param int<0,1> $showcode Show code in list
* @return array<int,array{key:int,value:string,label:string,labelhtml:string}>|string HTML string with
* @see select_company()
*/
public function select_thirdparty_list($selected = '', $htmlname = 'socid', $filter = '', $showempty = '', $showtype = 0, $forcecombo = 0, $events = array(), $filterkey = '', $outputmode = 0, $limit = 0, $morecss = 'minwidth100', $moreparam = '', $multiple = false, $excludeids = array(), $showcode = 0)
{
@@ -1510,11 +1511,6 @@ class Form
dol_syslog(get_class($this)."::select_thirdparty_list", LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql) {
if (!$forcecombo) {
include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';
$out .= ajax_combobox($htmlname, $events, getDolGlobalString("COMPANY_USE_SEARCH_TO_SELECT"));
}
// Construct $out and $outarray
$out .= '<select id="' . $htmlname . '" class="flat' . ($morecss ? ' ' . $morecss : '') . '"' . ($moreparam ? ' ' . $moreparam : '') . ' name="' . $htmlname . ($multiple ? '[]' : '') . '" ' . ($multiple ? 'multiple' : '') . '>' . "\n";
@@ -1614,6 +1610,10 @@ class Form
}
}
$out .= '</select>' . "\n";
if (!$forcecombo) {
include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';
$out .= ajax_combobox($htmlname, $events, getDolGlobalString("COMPANY_USE_SEARCH_TO_SELECT"));
}
} else {
dol_print_error($this->db);
}