diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index 2a8177df6f2..e19afe70e13 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -1077,7 +1077,7 @@ else print $hookmanager->resPrint; if (empty($reshook)) { - print $object->showOptionals($extrafields, 'edit'); + print $object->showOptionals($extrafields, 'edit', $parameters); } print ''; diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index b1b18e3ed31..ecfd12142f4 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -373,11 +373,11 @@ if ($action == 'create') // Other attributes $parameters = array(); - $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $act, $action); // Note that $action and $object may have been modified by hook + $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; if (empty($reshook)) { - print $object->showOptionals($extrafields, 'edit'); + print $object->showOptionals($extrafields, 'edit', $parameters); } print ''; print "\n"; @@ -823,7 +823,7 @@ if ($rowid > 0) print $hookmanager->resPrint; if (empty($reshook)) { - print $object->showOptionals($extrafields, 'edit'); + print $object->showOptionals($extrafields, 'edit', $parameters); } print ''; diff --git a/htdocs/asset/type.php b/htdocs/asset/type.php index 70191b5eb28..1ca019f5988 100644 --- a/htdocs/asset/type.php +++ b/htdocs/asset/type.php @@ -391,11 +391,11 @@ if ($action == 'create') // Other attributes $parameters = array(); - $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $act, $action); // Note that $action and $object may have been modified by hook + $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; if (empty($reshook)) { - print $object->showOptionals($extrafields, 'edit'); + print $object->showOptionals($extrafields, 'edit', $parameters); } print ''; print "\n"; @@ -606,7 +606,7 @@ if ($rowid > 0) print $hookmanager->resPrint; if (empty($reshook)) { - print $object->showOptionals($extrafields, 'edit'); + print $object->showOptionals($extrafields, 'edit', $parameters); } print ''; diff --git a/htdocs/categories/card.php b/htdocs/categories/card.php index 3578e0e0c60..d252171b38f 100644 --- a/htdocs/categories/card.php +++ b/htdocs/categories/card.php @@ -278,7 +278,7 @@ if ($user->rights->categorie->creer) print $hookmanager->resPrint; if (empty($reshook)) { - print $object->showOptionals($extrafields, 'edit'); + print $object->showOptionals($extrafields, 'edit', $parameters); } print ''; diff --git a/htdocs/categories/edit.php b/htdocs/categories/edit.php index a45ca818dbc..9c653decdff 100644 --- a/htdocs/categories/edit.php +++ b/htdocs/categories/edit.php @@ -180,7 +180,7 @@ $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, print $hookmanager->resPrint; if (empty($reshook)) { - print $object->showOptionals($extrafields, 'edit'); + print $object->showOptionals($extrafields, 'edit', $parameters); } print ''; diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index fa0e9c78de2..73408beefb0 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -1115,7 +1115,7 @@ if ($action == 'create') print $hookmanager->resPrint; if (empty($reshook)) { - print $object->showOptionals($extrafields, 'edit'); + print $object->showOptionals($extrafields, 'edit', $parameters); } print ''; @@ -1519,7 +1519,7 @@ if ($id > 0) print $hookmanager->resPrint; if (empty($reshook)) { - print $object->showOptionals($extrafields, 'edit'); + print $object->showOptionals($extrafields, 'edit', $parameters); } print ''; diff --git a/htdocs/comm/mailing/card.php b/htdocs/comm/mailing/card.php index a2d8c0a373b..8deb8100c72 100644 --- a/htdocs/comm/mailing/card.php +++ b/htdocs/comm/mailing/card.php @@ -1242,7 +1242,7 @@ else print $hookmanager->resPrint; if (empty($reshook)) { - print $object->showOptionals($extrafields, 'edit'); + print $object->showOptionals($extrafields, 'edit', $parameters); } print ''; diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index f949e118599..803d699077f 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -1771,7 +1771,7 @@ if ($action == 'create' && $usercancreate) } }; - print $object->showOptionals($extrafields, 'edit'); + print $object->showOptionals($extrafields, 'edit', $parameters); } // Template to use by default diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php index 3baf50fcc2c..7e14516e4cd 100644 --- a/htdocs/compta/bank/card.php +++ b/htdocs/compta/bank/card.php @@ -443,7 +443,7 @@ if ($action == 'create') print $hookmanager->resPrint; if (empty($reshook)) { - print $object->showOptionals($extrafields, 'edit'); + print $object->showOptionals($extrafields, 'edit', $parameters); } print ''; @@ -945,7 +945,7 @@ else print $hookmanager->resPrint; if (empty($reshook)) { - print $object->showOptionals($extrafields, 'edit'); + print $object->showOptionals($extrafields, 'edit', $parameters); } print ''; diff --git a/htdocs/compta/bank/various_payment/card.php b/htdocs/compta/bank/various_payment/card.php index c80a0cd0ab8..ab93b2f0f97 100644 --- a/htdocs/compta/bank/various_payment/card.php +++ b/htdocs/compta/bank/various_payment/card.php @@ -344,8 +344,6 @@ if ($action == 'create') $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - print ''; - // Category if (is_array($options) && count($options) && $conf->categorie->enabled) { diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 48cd8e81054..b6997922e2a 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -3282,11 +3282,11 @@ if ($action == 'create') } // Other attributes - $parameters = array('objectsrc' => $objectsrc, 'colspan' => ' colspan="2"', 'cols'=>2); + $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)) { - print $object->showOptionals($extrafields, 'edit'); + print $object->showOptionals($extrafields, 'edit', $parameters); } // Template to use by default diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php index 741d106ab48..391bdb64bcb 100644 --- a/htdocs/contact/card.php +++ b/htdocs/contact/card.php @@ -829,7 +829,7 @@ else print $hookmanager->resPrint; if (empty($reshook)) { - print $object->showOptionals($extrafields, 'edit'); + print $object->showOptionals($extrafields, 'edit', $parameters); } print "
"; @@ -1162,12 +1162,12 @@ else } // Other attributes - $parameters = array('colspan' => ' colspan="3"', 'cols'=>3); + $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)) { - print $object->showOptionals($extrafields, 'edit'); + print $object->showOptionals($extrafields, 'edit', $parameters); } $object->load_ref_elements(); diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 724a19bdbb8..8336ce11e17 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -1265,13 +1265,13 @@ if ($action == 'create') } // Other attributes - $parameters=array('objectsrc' => $objectsrc,'colspan' => ' colspan="3"', 'cols'=>3); + $parameters=array('objectsrc' => $objectsrc,'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; // Other attributes if (empty($reshook)) { - print $object->showOptionals($extrafields, 'edit'); + print $object->showOptionals($extrafields, 'edit', $parameters); } print "\n"; diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 8aa24819efd..360ac2f019d 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -6614,10 +6614,19 @@ abstract class CommonObject // Load language if required if (!empty($extrafields->attributes[$this->table_element]['langfile'][$key])) $langs->load($extrafields->attributes[$this->table_element]['langfile'][$key]); - $colspan = '3'; + $colspan = ''; if (is_array($params) && count($params) > 0) { - if (array_key_exists('colspan', $params)) { - $colspan = $params['colspan']; + if (array_key_exists('cols', $params)) { + $colspan = $params['cols']; + } + elseif (array_key_exists('colspan', $params)) { // For backward compatibility. Use cols instead now. + $reg = array(); + if (preg_match('/colspan="(\d+)"/', $params['colspan'], $reg)) { + $colspan = $reg[1]; + } + else { + $colspan = $params['colspan']; + } } } @@ -6659,7 +6668,7 @@ abstract class CommonObject } } - $out .= $extrafields->showSeparator($key, $this); + $out .= $extrafields->showSeparator($key, $this, ($colspan + 1)); } else { @@ -6679,9 +6688,9 @@ abstract class CommonObject $domData .= ' data-targetelement="'.$this->element.'"'; $domData .= ' data-targetid="'.$this->id.'"'; - $html_id = !empty($this->id) ? 'extrarow-'.$this->element.'_'.$key.'_'.$this->id : ''; + $html_id = (empty($this->id) ? '' : 'extrarow-'.$this->element.'_'.$key.'_'.$this->id); - $out .= ''; + $out .= ''; if (!empty($conf->global->MAIN_EXTRAFIELDS_USE_TWO_COLUMS) && ($e % 2) == 0) { $colspan = '0'; } @@ -6724,9 +6733,8 @@ abstract class CommonObject $out .= ''; $html_id = !empty($this->id) ? $this->element.'_extras_'.$key.'_'.$this->id : ''; - - $out .= ''; - //$out .=''; + + $out .= ''; switch ($mode) { case "view": diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 81dffc51b67..889a38efddb 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -1957,13 +1957,14 @@ class ExtraFields * * @param string $key Key of attribute * @param string $object Object + * @param int $colspan Value of colspan to use (it must includes the first column with title) * @return string HTML code with line for separator */ - public function showSeparator($key, $object) + public function showSeparator($key, $object, $colspan = 2) { global $langs; - $out = ''; + $out = ''; $out .= $langs->trans($this->attributes[$object->table_element]['label'][$key]); $out .= ''; diff --git a/htdocs/don/card.php b/htdocs/don/card.php index 223661bf280..e20db4be2d2 100644 --- a/htdocs/don/card.php +++ b/htdocs/don/card.php @@ -455,7 +455,7 @@ if ($action == 'create') print $hookmanager->resPrint; if (empty($reshook)) { - print $object->showOptionals($extrafields, 'edit'); + print $object->showOptionals($extrafields, 'edit', $parameters); } print ''; @@ -589,7 +589,7 @@ if (!empty($id) && $action == 'edit') print $hookmanager->resPrint; if (empty($reshook)) { - print $object->showOptionals($extrafields, 'edit'); + print $object->showOptionals($extrafields, 'edit', $parameters); } print "\n"; diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index 02db386f236..3f7abd4b4e5 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -1025,7 +1025,7 @@ if ($action == 'create') print "\n"; // Other attributes - $parameters = array('objectsrc' => $objectsrc, 'colspan' => ' colspan="3"', 'socid'=>$socid); + $parameters = array('objectsrc' => $objectsrc, 'colspan' => ' colspan="3"', 'cols' => '3', 'socid' => $socid); $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $expe, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; @@ -1034,7 +1034,7 @@ if ($action == 'create') if ($object->fetch_optionals() > 0) { $expe->array_options = array_merge($expe->array_options, $object->array_options); } - print $expe->showOptionals($extrafields, 'edit'); + print $expe->showOptionals($extrafields, 'edit', $parameters); } @@ -1994,7 +1994,7 @@ elseif ($id || $ref) } // Other attributes - $parameters = array('colspan' => ' colspan="3"'); + $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; diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index 5cb869c6817..b24259d797a 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -1532,11 +1532,11 @@ if ($action == 'create') } // Other attributes - $parameters = array('colspan' => ' colspan="3"'); + $parameters = array('colspan' => ' colspan="3"', 'cols' => 3); $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by print $hookmanager->resPrint; if (empty($reshook)) { - print $object->showOptionals($extrafields, 'edit'); + print $object->showOptionals($extrafields, 'edit', $parameters); } print ''; diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index eb5c959db7f..9371c6a308a 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -906,18 +906,17 @@ if ($action == 'create') print '
'; print ''; + print ''; + print ''; dol_fiche_head(''); print ''; - print ''; print ''; - print ''; - // Ref - print ''; + print ''; // Description (must be a textarea and not html must be allowed (used in list view) print ''; @@ -963,15 +962,15 @@ if ($action == 'create') // Model print ''; print ''; - print '"; // Public note print ''; - print ''; - print ''; + print ''; print ''; - print ''; print ''; - print ''; - // Payment term - print ''; // Payment mode - print ''; @@ -1636,7 +1634,7 @@ if ($action == 'create') if (!empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER) && !empty($conf->banque->enabled)) { $langs->load("bank"); - print ''; } @@ -1647,10 +1645,9 @@ if ($action == 'create') $formproject = new FormProjets($db); $langs->load('projects'); - print ''; } @@ -1659,7 +1656,7 @@ if ($action == 'create') { print ''; print ''; - print ''; } @@ -1669,7 +1666,7 @@ if ($action == 'create') { print ''; print ''; - print ''; } @@ -1700,26 +1697,26 @@ if ($action == 'create') print ''; $newclassname = $classname; - print ''; - print ''; - print '"; + print ''; + print ''; + print '"; if ($mysoc->localtax1_assuj == "1" || $objectsrc->total_localtax1 != 0) // Localtax1 RE { - print '"; + print '"; } if ($mysoc->localtax2_assuj == "1" || $objectsrc->total_localtax2 != 0) // Localtax2 IRPF { - print '"; + print '"; } - print '"; + print '"; if (!empty($conf->multicurrency->enabled)) { - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; } } diff --git a/htdocs/fourn/commande/orderstoinvoice.php b/htdocs/fourn/commande/orderstoinvoice.php index 7927af38786..098b6b93710 100644 --- a/htdocs/fourn/commande/orderstoinvoice.php +++ b/htdocs/fourn/commande/orderstoinvoice.php @@ -336,22 +336,22 @@ if ($action == 'create' && !$error) { print '
'.$langs->trans("ThirdParty").''.$soc->getNomUrl(1).'
'.$langs->trans('Ref').''.$langs->trans("Draft").'
'.$langs->trans('Ref').''.$langs->trans("Draft").'
'.$langs->trans("Description").'
'.$langs->trans("DefaultModel").''; + print ''; $liste = ModelePDFFicheinter::liste_modeles($db); print $form->selectarray('model', $liste, $conf->global->FICHEINTER_ADDON_PDF); print "
'.$langs->trans('NotePublic').''; + print ''.$langs->trans('NotePublic').''; $doleditor = new DolEditor('note_public', $note_public, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); print $doleditor->Create(1); //print ''; @@ -982,7 +981,7 @@ if ($action == 'create') { print '
'.$langs->trans('NotePrivate').''; + print ''; $doleditor = new DolEditor('note_private', $note_private, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); print $doleditor->Create(1); //print ''; @@ -990,7 +989,7 @@ if ($action == 'create') } // Other attributes - $parameters = array('colspan' => ' colspan="2"'); + $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)) diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index 9701f43d993..7e330635de8 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -1610,15 +1610,13 @@ if ($action == 'create') print '
'.$langs->trans('RefSupplier').'
'.$langs->trans('PaymentConditionsShort').''; + print '
'.$langs->trans('PaymentConditionsShort').''; $form->select_conditions_paiements(isset($_POST['cond_reglement_id']) ? $_POST['cond_reglement_id'] : $cond_reglement_id, 'cond_reglement_id'); print '
'.$langs->trans('PaymentMode').''; + print '
'.$langs->trans('PaymentMode').''; $form->select_types_paiements(isset($_POST['mode_reglement_id']) ? $_POST['mode_reglement_id'] : $mode_reglement_id, 'mode_reglement_id'); print '
'.$langs->trans('BankAccount').''; + print '
'.$langs->trans('BankAccount').''; $form->select_comptes($fk_account, 'fk_account', 0, '', 1); print '
'.$langs->trans('Project').''; + print '
'.$langs->trans('Project').''; $formproject->select_projects((empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS) ? $societe->id : -1), $projectid, 'projectid', 0, 0, 1, 1); print '   id).'">'.$langs->trans("AddProject").''; - print '
'; + print ''; print $form->select_incoterms((!empty($object->fk_incoterms) ? $object->fk_incoterms : ''), (!empty($object->location_incoterms) ? $object->location_incoterms : '')); print '
'.$form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0).''; + print ''; print $form->selectMultiCurrency($currency_code, 'multicurrency_code'); print '
'.$langs->trans($newclassname).''.$objectsrc->getNomUrl(1).'
'.$langs->trans('AmountHT').''.price($objectsrc->total_ht).'
'.$langs->trans('AmountVAT').''.price($objectsrc->total_tva)."
'.$langs->trans($newclassname).''.$objectsrc->getNomUrl(1).'
'.$langs->trans('AmountHT').''.price($objectsrc->total_ht).'
'.$langs->trans('AmountVAT').''.price($objectsrc->total_tva)."
'.$langs->transcountry("AmountLT1", $mysoc->country_code).''.price($objectsrc->total_localtax1)."
'.$langs->transcountry("AmountLT1", $mysoc->country_code).''.price($objectsrc->total_localtax1)."
'.$langs->transcountry("AmountLT2", $mysoc->country_code).''.price($objectsrc->total_localtax2)."
'.$langs->transcountry("AmountLT2", $mysoc->country_code).''.price($objectsrc->total_localtax2)."
'.$langs->trans('AmountTTC').''.price($objectsrc->total_ttc)."
'.$langs->trans('AmountTTC').''.price($objectsrc->total_ttc)."
'.$langs->trans('MulticurrencyAmountHT').''.price($objectsrc->multicurrency_total_ht).'
'.$langs->trans('MulticurrencyAmountVAT').''.price($objectsrc->multicurrency_total_tva).'
'.$langs->trans('MulticurrencyAmountTTC').''.price($objectsrc->multicurrency_total_ttc).'
'.$langs->trans('MulticurrencyAmountHT').''.price($objectsrc->multicurrency_total_ht).'
'.$langs->trans('MulticurrencyAmountVAT').''.price($objectsrc->multicurrency_total_tva).'
'.$langs->trans('MulticurrencyAmountTTC').''.price($objectsrc->multicurrency_total_ttc).'
'; // Ref - print ''; + print ''; // Ref supplier print ''; print ''; // Date invoice - print ''; // Payment term - print ''; // Payment mode - print ''; // Project @@ -359,7 +359,7 @@ if ($action == 'create' && !$error) { $formproject = new FormProjets($db); $langs->load('projects'); - print ''; } @@ -367,9 +367,7 @@ if ($action == 'create' && !$error) { // Other attributes $parameters = array( 'objectsrc' => $objectsrc, - 'idsrc' => $listoforders, - 'colspan' => ' colspan="2"', - 'cols'=>2 + 'idsrc' => $listoforders ); $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; @@ -390,7 +388,7 @@ if ($action == 'create' && !$error) { // Public note print ''; print ''; - print ''; diff --git a/htdocs/product/card.php b/htdocs/product/card.php index a5793cc66c8..8fccf28c472 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -1146,7 +1146,7 @@ else } // Other attributes - $parameters = array('colspan' => 3); + $parameters = array('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)) diff --git a/htdocs/product/price.php b/htdocs/product/price.php index 2fd5f950e4d..6609d6c3968 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -1274,7 +1274,7 @@ if ($action == 'edit_price' && $object->getRights()->creer) print ''; print ''; - $parameters = array('colspan' => 2); + $parameters = array(); $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print '
'.$langs->trans('Ref').''.$langs->trans('Draft').'
'.$langs->trans('Ref').''.$langs->trans('Draft').'
'.$langs->trans('RefSupplier').'
'.$langs->trans('Date').''; + print '
'.$langs->trans('Date').''; print $html->selectDate('', '', '', '', '', "add", 1, 1); print '
'.$langs->trans('PaymentConditionsShort').''; + print '
'.$langs->trans('PaymentConditionsShort').''; $html->select_conditions_paiements(isset($_POST['cond_reglement_id']) ? $_POST['cond_reglement_id'] : $cond_reglement_id, 'cond_reglement_id'); print '
'.$langs->trans('PaymentMode').''; + print '
'.$langs->trans('PaymentMode').''; $html->select_types_paiements(isset($_POST['mode_reglement_id']) ? $_POST['mode_reglement_id'] : $mode_reglement_id, 'mode_reglement_id'); print '
'.$langs->trans('Project').''; + print '
'.$langs->trans('Project').''; $formproject->select_projects($soc->id, $projectid, 'projectid'); print '
'.$langs->trans('NotePublic').''; + print ''; print '
'; diff --git a/htdocs/product/stock/card.php b/htdocs/product/stock/card.php index 6f8c5648275..034e0076f09 100644 --- a/htdocs/product/stock/card.php +++ b/htdocs/product/stock/card.php @@ -721,12 +721,12 @@ else print ''; // Other attributes - $parameters = array('colspan' => ' colspan="3"', 'cols'=>3); + $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)) { - print $object->showOptionals($extrafields, 'edit'); + print $object->showOptionals($extrafields, 'edit', $parameters); } // Tags-Categories if ($conf->categorie->enabled) diff --git a/htdocs/reception/card.php b/htdocs/reception/card.php index d76ee06ab5a..d4c0130ce84 100644 --- a/htdocs/reception/card.php +++ b/htdocs/reception/card.php @@ -864,7 +864,7 @@ if ($action == 'create') print "\n"; // Other attributes - $parameters = array('objectsrc' => $objectsrc, 'colspan' => ' colspan="3"', 'socid'=>$socid); + $parameters = array('objectsrc' => $objectsrc, 'colspan' => ' colspan="3"', 'cols' => '3', 'socid'=>$socid); $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $recept, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; @@ -875,7 +875,7 @@ if ($action == 'create') if ($object->fetch_optionals() > 0) { $recept->array_options = array_merge($recept->array_options, $object->array_options); } - print $object->showOptionals($extrafields, 'edit'); + print $object->showOptionals($extrafields, 'edit', $parameters); } // Incoterms diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index cfd3e7f8b95..0793282cd86 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -1536,12 +1536,12 @@ else } // Other attributes - $parameters = array('colspan' => ' colspan="3"', 'colspanvalue' => '3'); + $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)) { - print $object->showOptionals($extrafields, 'edit'); + print $object->showOptionals($extrafields, 'edit', $parameters); } // Assign a sale representative @@ -2200,12 +2200,12 @@ else } // Other attributes - $parameters = array('colspan' => ' colspan="3"', 'colspanvalue' => '3'); + $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)) { - print $object->showOptionals($extrafields, 'edit'); + print $object->showOptionals($extrafields, 'edit', $parameters); } // Webservices url/key diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php index adb39743af7..584fcd0f4a5 100644 --- a/htdocs/supplier_proposal/card.php +++ b/htdocs/supplier_proposal/card.php @@ -1244,11 +1244,11 @@ if ($action == 'create') } // Other attributes - $parameters = array('colspan' => ' colspan="3"'); + $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)) { - print $object->showOptionals($extrafields, 'edit'); + print $object->showOptionals($extrafields, 'edit', $parameters); } diff --git a/htdocs/user/group/card.php b/htdocs/user/group/card.php index 54a1b7dce88..ff0c74dad69 100644 --- a/htdocs/user/group/card.php +++ b/htdocs/user/group/card.php @@ -304,7 +304,7 @@ if ($action == 'create') print "\n"; // Other attributes - $parameters = array('object' => $object, 'colspan' => ' colspan="2"'); + $parameters = array('object' => $object); $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; if (empty($reshook))