new : select2 for contract selector

This commit is contained in:
florian HENRY 2017-04-07 14:55:14 +02:00
parent 60a54041c2
commit a1c1aa054f

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,11 @@ class FormContract
}
print '</select>';
$db->free($resql);
// Make select dynamic
include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';
print ajax_combobox($htmlname);
return $num;
}
else