diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index a56402fddef..ba491580efc 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -1456,6 +1456,7 @@ class Form $langs->load('companies'); if (empty($htmlid)) $htmlid = $htmlname; + $num = 0; if ($selected === '') $selected = array(); elseif (!is_array($selected)) $selected = array($selected); @@ -4999,7 +5000,8 @@ class Form print ''; print '
| '; - $num = $this->select_contacts($societe->id, $selected, $htmlname); + print $this->selectcontacts($societe->id, $selected, $htmlname); + $num = $this->num; if ($num == 0) { $addcontact = (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("AddContact") : $langs->trans("AddContactAddress")); diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php index cd224d55082..aa90ee7fa1c 100644 --- a/htdocs/core/class/html.formticket.class.php +++ b/htdocs/core/class/html.formticket.class.php @@ -385,7 +385,7 @@ class FormTicket // If no socid, set to -1 to avoid full contacts list $selectedCompany = ($this->withfromsocid > 0) ? $this->withfromsocid : -1; print img_picto('', 'contact', 'class="paddingright"'); - $nbofcontacts = $form->select_contacts($selectedCompany, $this->withfromcontactid, 'contactid', 3, '', '', 0, 'minwidth200'); + print $form->selectcontacts($selectedCompany, $this->withfromcontactid, 'contactid', 3, '', '', 0, 'minwidth200'); print ' '; $formcompany->selectTypeContact($ticketstatic, '', 'type', 'external', '', 0, 'maginleftonly'); print ' | '; $contactofproject = $projectstatic->getListContactId('external'); - $nbofcontacts = $form->select_contacts($selectedCompany, '', 'contactid', 0, '', $contactofproject); + print $form->selectcontacts($selectedCompany, '', 'contactid', 0, '', $contactofproject); + $nbofcontacts = $form->num; print ' | '; print ''; $formcompany->selectTypeContact($object, '', 'type', 'external', 'rowid'); |