';
print '';
@@ -1657,15 +1645,14 @@ $db->close();
* Show fields in insert/edit mode
*
* @param array $fieldlist Array of fields
- * @param Translate $langs Translate class
* @param Object $obj If we show a particular record, obj is filled with record fields
* @param string $tabname Name of SQL table
* @param string $context 'add'=Output field for the "add form", 'edit'=Output field for the "edit form", 'hide'=Output field for the "add form" but we dont want it to be rendered
* @return void
*/
-function fieldList($fieldlist, $langs, $obj='', $tabname='', $context='')
+function fieldList($fieldlist, $obj='', $tabname='', $context='')
{
- global $conf,$db;
+ global $conf,$langs,$db;
global $form;
global $region_id;
global $elementList,$sourceList,$localtax_typeList;
@@ -1677,7 +1664,15 @@ function fieldList($fieldlist, $langs, $obj='', $tabname='', $context='')
foreach ($fieldlist as $field => $value)
{
- if ($fieldlist[$field] == 'country')
+ if (in_array($fieldlist[$field], array('code', 'libelle', 'type')) && $tabname == MAIN_DB_PREFIX."c_actioncomm" && in_array($obj->type, array('system','systemauto')))
+ {
+ $hidden = (! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'');
+ print '