Merge pull request #6660 from atm-florian/dev_contractselect

NEW select2 for contract selector
This commit is contained in:
Laurent Destailleur 2017-04-11 11:08:59 +02:00 committed by GitHub
commit 81020cea77

View File

@ -66,6 +66,7 @@ class FormContract
//if ($contratListId) $sql.= " AND c.rowid IN (".$contratListId.")";
if ($socid == 0) $sql.= " AND (c.fk_soc = 0 OR c.fk_soc IS NULL)";
if ($socid > 0) $sql.= " AND (c.fk_soc=".$socid." OR c.fk_soc IS NULL)";
$sql.= " ORDER BY c.ref ";
dol_syslog(get_class($this)."::select_contract", LOG_DEBUG);
$resql=$db->query($sql);
@ -129,6 +130,14 @@ class FormContract
}
print '</select>';
$db->free($resql);
if (!empty($conf->use_javascript_ajax))
{
// Make select dynamic
include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';
print ajax_combobox($htmlname);
}
return $num;
}
else