Update html.form.class.php
This commit is contained in:
parent
37f3b8bbde
commit
89909ebab0
@ -1389,7 +1389,7 @@ class Form
|
|||||||
* Return HTML code of the SELECT of list of all contacts (for a third party or all).
|
* Return HTML code of the SELECT of list of all contacts (for a third party or all).
|
||||||
* This also set the number of contacts found into $this->num
|
* This also set the number of contacts found into $this->num
|
||||||
*
|
*
|
||||||
* @since 9.0 Add afterSelectOptions hook & selectcontacts context.
|
* @since 9.0 Add afterSelectContactOptions hook
|
||||||
*
|
*
|
||||||
* @param int $socid Id ot third party or 0 for all or -1 for empty list
|
* @param int $socid Id ot third party or 0 for all or -1 for empty list
|
||||||
* @param array|int $selected Array of ID of pre-selected contact id
|
* @param array|int $selected Array of ID of pre-selected contact id
|
||||||
@ -1420,15 +1420,13 @@ class Form
|
|||||||
else if (!is_array($selected)) $selected = array($selected);
|
else if (!is_array($selected)) $selected = array($selected);
|
||||||
$out='';
|
$out='';
|
||||||
|
|
||||||
// Add selectcontacts hook
|
|
||||||
if (! is_object($hookmanager))
|
if (! is_object($hookmanager))
|
||||||
{
|
{
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
|
||||||
$hookmanager=new HookManager($this->db);
|
$hookmanager=new HookManager($this->db);
|
||||||
}
|
}
|
||||||
$hookmanager->initHooks(array('selectcontacts'));
|
|
||||||
|
|
||||||
// On recherche les societes
|
// We search third parties
|
||||||
$sql = "SELECT sp.rowid, sp.lastname, sp.statut, sp.firstname, sp.poste";
|
$sql = "SELECT sp.rowid, sp.lastname, sp.statut, sp.firstname, sp.poste";
|
||||||
if ($showsoc > 0) $sql.= " , s.nom as company";
|
if ($showsoc > 0) $sql.= " , s.nom as company";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX ."socpeople as sp";
|
$sql.= " FROM ".MAIN_DB_PREFIX ."socpeople as sp";
|
||||||
@ -1523,7 +1521,7 @@ class Form
|
|||||||
'showsoc'=>$showsoc,
|
'showsoc'=>$showsoc,
|
||||||
);
|
);
|
||||||
|
|
||||||
$reshook = $hookmanager->executeHooks( 'afterSelectOptions', $parameters, $this, $action ); // Note that $action and $object may have been modified by some hooks
|
$reshook = $hookmanager->executeHooks( 'afterSelectContactOptions', $parameters, $this, $action ); // Note that $action and $object may have been modified by some hooks
|
||||||
|
|
||||||
if ($htmlname != 'none' || $options_only)
|
if ($htmlname != 'none' || $options_only)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user