Fix: avoid warning
This commit is contained in:
parent
2607a8a3dd
commit
b70af837df
@ -625,17 +625,20 @@ class FormCompany
|
|||||||
*/
|
*/
|
||||||
function selectTypeContact($object, $selected, $htmlname = 'type', $source='internal', $order='code', $showempty=0)
|
function selectTypeContact($object, $selected, $htmlname = 'type', $source='internal', $order='code', $showempty=0)
|
||||||
{
|
{
|
||||||
$lesTypes = $object->liste_type_contact($source, $order);
|
if (is_object($object) && method_exists($object, 'liste_type_contact'))
|
||||||
print '<select class="flat" name="'.$htmlname.'" id="'.$htmlname.'">';
|
|
||||||
if ($showempty) print '<option value="0"></option>';
|
|
||||||
foreach($lesTypes as $key=>$value)
|
|
||||||
{
|
{
|
||||||
print '<option value="'.$key.'"';
|
$lesTypes = $object->liste_type_contact($source, $order);
|
||||||
if ($key == $selected)
|
print '<select class="flat" name="'.$htmlname.'" id="'.$htmlname.'">';
|
||||||
print ' selected';
|
if ($showempty) print '<option value="0"></option>';
|
||||||
print '>'.$value.'</option>';
|
foreach($lesTypes as $key=>$value)
|
||||||
|
{
|
||||||
|
print '<option value="'.$key.'"';
|
||||||
|
if ($key == $selected)
|
||||||
|
print ' selected';
|
||||||
|
print '>'.$value.'</option>';
|
||||||
|
}
|
||||||
|
print "</select>\n";
|
||||||
}
|
}
|
||||||
print "</select>\n";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user