diff --git a/htdocs/adherents/cartes/carte.php b/htdocs/adherents/cartes/carte.php index 59713e20573..2c1db41ed00 100644 --- a/htdocs/adherents/cartes/carte.php +++ b/htdocs/adherents/cartes/carte.php @@ -45,6 +45,7 @@ $modellabel=GETPOST("modellabel"); // Doc template to use for address sheet $mesg=''; $adherentstatic=new Adherent($db); +$object=new Adherent($db); $extrafields = new ExtraFields($db); // fetch optionals attributes and labels @@ -70,11 +71,11 @@ if ((! empty($foruserid) || ! empty($foruserlogin) || ! empty($mode)) && ! $mesg $sql.= " t.libelle as type,"; $sql.= " c.code as country_code, c.label as country"; // Add fields from extrafields - foreach ($extrafields->attribute_label as $key => $val) - $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : ''); + if (! empty($extrafields->attributes[$object->table_element]['label'])) + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : ''); $sql.= " FROM ".MAIN_DB_PREFIX."adherent_type as t, ".MAIN_DB_PREFIX."adherent as d"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON d.country = c.rowid"; - if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."adherent_extrafields as ef on (d.rowid = ef.fk_object)"; + if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."adherent_extrafields as ef on (d.rowid = ef.fk_object)"; $sql.= " WHERE d.fk_adherent_type = t.rowid AND d.statut = 1"; $sql.= " AND d.entity IN (".getEntity('adherent').")"; if (is_numeric($foruserid)) $sql.=" AND d.rowid=".$foruserid; @@ -98,10 +99,10 @@ if ((! empty($foruserid) || ! empty($foruserlogin) || ! empty($mode)) && ! $mesg $adherentstatic->firstname=$objp->firstname; // format extrafiled so they can be parsed in function complete_substitutions_array - if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) + if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { $adherentstatic->array_options = array(); - foreach($extrafields->attribute_label as $key => $val) + foreach($extrafields->attributes[$object->table_element]['label'] as $key => $val) { $tmpkey='options_'.$key; if (!empty($objp->$tmpkey)) diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index 929dc706042..c695d0cc699 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -338,7 +338,7 @@ if ($action == 'create') $parameters=array(); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$act,$action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (empty($reshook) && ! empty($extrafields->attribute_label)) + if (empty($reshook) { print $object->showOptionals($extrafields,'edit'); } @@ -736,7 +736,7 @@ if ($rowid > 0) $parameters=array(); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$act,$action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (empty($reshook) && ! empty($extrafields->attribute_label)) + if (empty($reshook) { print $object->showOptionals($extrafields,'edit'); } @@ -744,7 +744,7 @@ if ($rowid > 0) print ''; // Extra field - if (empty($reshook) && ! empty($extrafields->attribute_label)) + if (empty($reshook) { print '

'; foreach($extrafields->attribute_label as $key=>$label) diff --git a/htdocs/assets/type.php b/htdocs/assets/type.php index 51445f86254..15d93f598f8 100644 --- a/htdocs/assets/type.php +++ b/htdocs/assets/type.php @@ -317,7 +317,7 @@ if ($action == 'create') $parameters=array(); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$act,$action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (empty($reshook) && ! empty($extrafields->attribute_label)) + if (empty($reshook) { print $object->showOptionals($extrafields,'edit'); } @@ -715,7 +715,7 @@ if ($rowid > 0) $parameters=array(); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$act,$action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (empty($reshook) && ! empty($extrafields->attribute_label)) + if (empty($reshook) { print $object->showOptionals($extrafields,'edit'); } @@ -723,7 +723,7 @@ if ($rowid > 0) print '
'; // Extra field - if (empty($reshook) && ! empty($extrafields->attribute_label)) + if (empty($reshook) { print '

'; foreach($extrafields->attribute_label as $key=>$label) diff --git a/htdocs/categories/card.php b/htdocs/categories/card.php index 9f49e42f060..9911ad01b0b 100644 --- a/htdocs/categories/card.php +++ b/htdocs/categories/card.php @@ -268,7 +268,7 @@ if ($user->rights->categorie->creer) $parameters=array(); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (empty($reshook) && ! empty($extrafields->attribute_label)) + if (empty($reshook) { print $object->showOptionals($extrafields,'edit'); } diff --git a/htdocs/categories/edit.php b/htdocs/categories/edit.php index 4ccd9116d74..ed6783ea59e 100644 --- a/htdocs/categories/edit.php +++ b/htdocs/categories/edit.php @@ -176,7 +176,7 @@ print ''; $parameters=array(); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; -if (empty($reshook) && ! empty($extrafields->attribute_label)) +if (empty($reshook) { print $object->showOptionals($extrafields,'edit'); } diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index d0d97f83435..c42bf4b8c70 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -908,7 +908,7 @@ if ($action == 'create') $parameters=array(); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (empty($reshook) && ! empty($extrafields->attribute_label)) + if (empty($reshook) { print $object->showOptionals($extrafields,'edit'); } @@ -1260,7 +1260,7 @@ if ($id > 0) $parameters=array(); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (empty($reshook) && ! empty($extrafields->attribute_label)) + if (empty($reshook) { print $object->showOptionals($extrafields,'edit'); } diff --git a/htdocs/comm/mailing/card.php b/htdocs/comm/mailing/card.php index a8bbb05fb84..ddce7036c58 100644 --- a/htdocs/comm/mailing/card.php +++ b/htdocs/comm/mailing/card.php @@ -754,7 +754,7 @@ if ($action == 'create') $parameters=array(); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (empty($reshook) && ! empty($extrafields->attribute_label)) + if (empty($reshook) { print $object->showOptionals($extrafields,'edit'); } @@ -1235,7 +1235,7 @@ else $parameters=array(); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (empty($reshook) && ! empty($extrafields->attribute_label)) + if (empty($reshook) { print $object->showOptionals($extrafields,'edit'); } diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index b3757021ee8..e0f29d5f7ee 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -1646,7 +1646,7 @@ if ($action == 'create' && $user->rights->commande->creer) $parameters = array('objectsrc' => $objectsrc, 'socid'=>$socid); $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by print $hookmanager->resPrint; - if (empty($reshook) && ! empty($extrafields->attribute_label)) { + if (empty($reshook) { print $object->showOptionals($extrafields, 'edit'); } diff --git a/htdocs/commande/orderstoinvoice.php b/htdocs/commande/orderstoinvoice.php index bebcaa93097..63c590af3be 100644 --- a/htdocs/commande/orderstoinvoice.php +++ b/htdocs/commande/orderstoinvoice.php @@ -472,7 +472,7 @@ if ($action == 'create' && !$error) $parameters=array('objectsrc' => $objectsrc, 'idsrc' => $listoforders); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (empty($reshook) && ! empty($extrafields->attribute_label)) + if (empty($reshook) { $object=new Facture($db); print $object->showOptionals($extrafields,'edit'); diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php index 78c5defed30..ee7adeb57d7 100644 --- a/htdocs/compta/bank/card.php +++ b/htdocs/compta/bank/card.php @@ -413,7 +413,7 @@ if ($action == 'create') $parameters=array(); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (empty($reshook) && ! empty($extrafields->attribute_label)) + if (empty($reshook) { print $object->showOptionals($extrafields,'edit',$parameters); } @@ -914,7 +914,7 @@ else $parameters=array(); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (empty($reshook) && ! empty($extrafields->attribute_label)) + if (empty($reshook) { print $object->showOptionals($extrafields,'edit'); } diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 044ca7da392..d21d6a637ad 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -2857,7 +2857,7 @@ if ($action == 'create') $parameters = array('objectsrc' => $objectsrc,'colspan' => ' colspan="2"', 'cols'=>2); $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (empty($reshook) && ! empty($extrafields->attribute_label)) { + if (empty($reshook) { print $object->showOptionals($extrafields, 'edit'); } diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php index 560acabaee9..bf05d802438 100644 --- a/htdocs/contact/card.php +++ b/htdocs/contact/card.php @@ -686,7 +686,7 @@ else $parameters=array('socid' => $socid, 'objsoc' => $objsoc, 'colspan' => ' colspan="3"', 'cols' => 3); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (empty($reshook) && ! empty($extrafields->attribute_label)) + if (empty($reshook) { print $object->showOptionals($extrafields,'edit'); } @@ -963,7 +963,7 @@ else $parameters=array('colspan' => ' colspan="3"', 'cols'=>3); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (empty($reshook) && ! empty($extrafields->attribute_label)) + if (empty($reshook) { print $object->showOptionals($extrafields,'edit'); } diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 41cf0c12f3e..3ea527c80b9 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -1287,7 +1287,7 @@ if ($action == 'create') print $hookmanager->resPrint; // Other attributes - if (empty($reshook) && ! empty($extrafields->attribute_label)) { + if (empty($reshook) { print $object->showOptionals($extrafields, 'edit'); } diff --git a/htdocs/don/card.php b/htdocs/don/card.php index 78b8d01e51d..d15fe10ec0b 100644 --- a/htdocs/don/card.php +++ b/htdocs/don/card.php @@ -387,7 +387,7 @@ if ($action == 'create') $parameters=array(); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (empty($reshook) && ! empty($extrafields->attribute_label)) + if (empty($reshook) { print $object->showOptionals($extrafields,'edit',$parameters); } @@ -513,7 +513,7 @@ if (! empty($id) && $action == 'edit') $parameters=array(); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (empty($reshook) && ! empty($extrafields->attribute_label)) + if (empty($reshook) { print $object->showOptionals($extrafields,'edit'); } diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index 89f1aee7b4b..338b07edca4 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -1059,7 +1059,7 @@ if ($action == 'create') $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$expe,$action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (empty($reshook) && ! empty($extrafields->attribute_label)) { + if (empty($reshook) { // copy from order $orderExtrafields = new Extrafields($db); $orderExtrafieldLabels = $orderExtrafields->fetch_name_optionals_label($object->table_element); diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index 33bf5245e62..0474cde1128 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -1412,7 +1412,7 @@ if ($action == 'create') $parameters = array('colspan' => ' colspan="3"'); $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by print $hookmanager->resPrint; - if (empty($reshook) && ! empty($extrafields->attribute_label)) { + if (empty($reshook) { print $object->showOptionals($extrafields, 'edit'); } diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index 01e7e1d7160..67d6a55c8bc 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -1002,7 +1002,7 @@ if ($action == 'create') $parameters=array('colspan' => ' colspan="2"'); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (empty($reshook) && ! empty($extrafields->attribute_label)) + if (empty($reshook) { print $object->showOptionals($extrafields,'edit'); } diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index 226ae56125a..ef13353ed64 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -1609,7 +1609,7 @@ if ($action=='create') $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (empty($reshook) && ! empty($extrafields->attribute_label)) + if (empty($reshook) { print $object->showOptionals($extrafields,'edit'); } diff --git a/htdocs/fourn/commande/orderstoinvoice.php b/htdocs/fourn/commande/orderstoinvoice.php index dbed55a75f5..330a404790c 100644 --- a/htdocs/fourn/commande/orderstoinvoice.php +++ b/htdocs/fourn/commande/orderstoinvoice.php @@ -371,7 +371,7 @@ if ($action == 'create' && !$error) { $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (empty($reshook) && ! empty($extrafields->attribute_label)) + if (empty($reshook) { $object=new FactureFournisseur($db); print $object->showOptionals($extrafields,'edit'); diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 1029cad1b03..d79005ea9a2 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -1998,7 +1998,7 @@ if ($action == 'create') // print ''; print ''; - if (empty($reshook) && ! empty($extrafields->attribute_label)) + if (empty($reshook) { print $object->showOptionals($extrafields, 'edit'); } diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 1b68baf253a..99cf8654006 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -1097,7 +1097,7 @@ else $parameters=array('cols' => 3); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (empty($reshook) && ! empty($extrafields->attribute_label)) + if (empty($reshook) { print $object->showOptionals($extrafields,'edit',$parameters); } @@ -1470,7 +1470,7 @@ else $parameters=array('colspan' => ' colspan="3"', 'cols'=>3); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (empty($reshook) && ! empty($extrafields->attribute_label)) + if (empty($reshook) { print $object->showOptionals($extrafields,'edit'); } diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index 00266b74e9c..96bb5b99795 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -629,7 +629,7 @@ if ($action == 'create' && $user->rights->projet->creer) $parameters=array(); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (empty($reshook) && ! empty($extrafields->attribute_label)) + if (empty($reshook) { print $object->showOptionals($extrafields,'edit'); } @@ -869,7 +869,7 @@ elseif ($object->id > 0) $parameters=array(); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (empty($reshook) && ! empty($extrafields->attribute_label)) + if (empty($reshook) { print $object->showOptionals($extrafields,'edit'); } diff --git a/htdocs/projet/tasks/task.php b/htdocs/projet/tasks/task.php index ac711015765..fa837607f41 100644 --- a/htdocs/projet/tasks/task.php +++ b/htdocs/projet/tasks/task.php @@ -416,7 +416,7 @@ if ($id > 0 || ! empty($ref)) $parameters=array(); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (empty($reshook) && ! empty($extrafields->attribute_label)) + if (empty($reshook) { print $object->showOptionals($extrafields,'edit'); } diff --git a/htdocs/resource/card.php b/htdocs/resource/card.php index 6e3d1896a71..f8ff77c035e 100644 --- a/htdocs/resource/card.php +++ b/htdocs/resource/card.php @@ -285,7 +285,7 @@ if ($action == 'create' || $object->fetch($id) > 0) $parameters=array('objectsrc' => $objectsrc); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (empty($reshook) && ! empty($extrafields->attribute_label)) + if (empty($reshook) { print $object->showOptionals($extrafields,'edit'); } diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index bc16a30d7da..66795cfd8e7 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -1431,7 +1431,7 @@ else $parameters=array('colspan' => ' colspan="3"', 'colspanvalue' => '3'); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (empty($reshook) && ! empty($extrafields->attribute_label)) + if (empty($reshook) { print $object->showOptionals($extrafields,'edit'); } @@ -2018,7 +2018,7 @@ else $parameters=array('colspan' => ' colspan="3"', 'colspanvalue' => '3'); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (empty($reshook) && ! empty($extrafields->attribute_label)) + if (empty($reshook) { print $object->showOptionals($extrafields,'edit'); } diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php index ade114f11b3..fd74932d57e 100644 --- a/htdocs/supplier_proposal/card.php +++ b/htdocs/supplier_proposal/card.php @@ -1151,7 +1151,7 @@ if ($action == 'create') $parameters = array('colspan' => ' colspan="3"'); $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (empty($reshook) && ! empty($extrafields->attribute_label)) { + if (empty($reshook) { print $object->showOptionals($extrafields, 'edit'); } diff --git a/htdocs/user/card.php b/htdocs/user/card.php index f9a69d37baa..4fd1c105055 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -1070,7 +1070,7 @@ if ($action == 'create' || $action == 'adduserldap') $parameters=array('objectsrc' => $objectsrc, 'colspan' => ' colspan="3"'); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (empty($reshook) && ! empty($extrafields->attribute_label)) + if (empty($reshook) { print $object->showOptionals($extrafields,'edit'); } @@ -2322,7 +2322,7 @@ else $parameters=array('colspan' => ' colspan="2"'); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (empty($reshook) && ! empty($extrafields->attribute_label)) + if (empty($reshook) { print $object->showOptionals($extrafields,'edit'); } diff --git a/htdocs/user/group/card.php b/htdocs/user/group/card.php index 3f350b7773e..c3adb2f2f20 100644 --- a/htdocs/user/group/card.php +++ b/htdocs/user/group/card.php @@ -304,7 +304,7 @@ if ($action == 'create') $parameters=array('object' => $object, 'colspan' => ' colspan="2"'); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (empty($reshook) && ! empty($extrafields->attribute_label)) + if (empty($reshook) { print $object->showOptionals($extrafields,'edit'); } @@ -570,7 +570,7 @@ else $parameters=array(); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (empty($reshook) && ! empty($extrafields->attribute_label)) + if (empty($reshook) { print $object->showOptionals($extrafields,'edit'); }