Skip to content
Snippets Groups Projects
Commit b70af837 authored by Regis Houssin's avatar Regis Houssin
Browse files

Fix: avoid warning

parent 2607a8a3
No related branches found
No related tags found
No related merge requests found
......@@ -625,17 +625,20 @@ class FormCompany
*/
function selectTypeContact($object, $selected, $htmlname = 'type', $source='internal', $order='code', $showempty=0)
{
$lesTypes = $object->liste_type_contact($source, $order);
print '<select class="flat" name="'.$htmlname.'" id="'.$htmlname.'">';
if ($showempty) print '<option value="0"></option>';
foreach($lesTypes as $key=>$value)
if (is_object($object) && method_exists($object, 'liste_type_contact'))
{
print '<option value="'.$key.'"';
if ($key == $selected)
print ' selected';
print '>'.$value.'</option>';
$lesTypes = $object->liste_type_contact($source, $order);
print '<select class="flat" name="'.$htmlname.'" id="'.$htmlname.'">';
if ($showempty) print '<option value="0"></option>';
foreach($lesTypes as $key=>$value)
{
print '<option value="'.$key.'"';
if ($key == $selected)
print ' selected';
print '>'.$value.'</option>';
}
print "</select>\n";
}
print "</select>\n";
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment