Fix pb with colspan and extrafields.

Fix remove empty id
This commit is contained in:
Laurent Destailleur 2019-11-16 14:38:05 +01:00
parent 6dcd1f6275
commit 2689f7515c
28 changed files with 93 additions and 92 deletions

View File

@ -1077,7 +1077,7 @@ else
print $hookmanager->resPrint;
if (empty($reshook))
{
print $object->showOptionals($extrafields, 'edit');
print $object->showOptionals($extrafields, 'edit', $parameters);
}
print '<tbody>';

View File

@ -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 '<tbody>';
print "</table>\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 '</table>';

View File

@ -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 '<tbody>';
print "</table>\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 '</table>';

View File

@ -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 '</table>';

View File

@ -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 '</table>';

View File

@ -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 '</table>';
@ -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 '</table>';

View File

@ -1242,7 +1242,7 @@ else
print $hookmanager->resPrint;
if (empty($reshook))
{
print $object->showOptionals($extrafields, 'edit');
print $object->showOptionals($extrafields, 'edit', $parameters);
}
print '</table>';

View File

@ -1771,7 +1771,7 @@ if ($action == 'create' && $usercancreate)
}
};
print $object->showOptionals($extrafields, 'edit');
print $object->showOptionals($extrafields, 'edit', $parameters);
}
// Template to use by default

View File

@ -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 '</table>';
@ -945,7 +945,7 @@ else
print $hookmanager->resPrint;
if (empty($reshook))
{
print $object->showOptionals($extrafields, 'edit');
print $object->showOptionals($extrafields, 'edit', $parameters);
}
print '</table>';

View File

@ -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 '</td></tr>';
// Category
if (is_array($options) && count($options) && $conf->categorie->enabled)
{

View File

@ -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

View File

@ -829,7 +829,7 @@ else
print $hookmanager->resPrint;
if (empty($reshook))
{
print $object->showOptionals($extrafields, 'edit');
print $object->showOptionals($extrafields, 'edit', $parameters);
}
print "</table><br>";
@ -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();

View File

@ -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 "</table>\n";

View File

@ -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 .= '<tr id="'.$html_id.'" '.$csstyle.' class="'.$class.$this->element.'_extras_'.$key.' trextrafields_collapse'.$extrafields_collapse_num.'" '.$domData.' >';
$out .= '<tr '.($html_id ? 'id="'.$html_id.'" ': '').$csstyle.' class="'.$class.$this->element.'_extras_'.$key.' trextrafields_collapse'.$extrafields_collapse_num.'" '.$domData.' >';
if (!empty($conf->global->MAIN_EXTRAFIELDS_USE_TWO_COLUMS) && ($e % 2) == 0) { $colspan = '0'; }
@ -6724,9 +6733,8 @@ abstract class CommonObject
$out .= '</td>';
$html_id = !empty($this->id) ? $this->element.'_extras_'.$key.'_'.$this->id : '';
$out .= '<td id="'.$html_id.'" class="'.$this->element.'_extras_'.$key.'" '.($colspan ? ' colspan="'.$colspan.'"' : '').'>';
//$out .='<td id="'.$html_id.'" class="'.$this->element.'_extras_'.$key.'">';
$out .= '<td '.($html_id ? 'id="'.$html_id.'" ': '').'class="'.$this->element.'_extras_'.$key.'" '.($colspan ? ' colspan="'.$colspan.'"' : '').'>';
switch ($mode) {
case "view":

View File

@ -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 = '<tr id="trextrafieldseparator'.$key.'" class="trextrafieldseparator trextrafieldseparator'.$key.'"><td colspan="2"><strong>';
$out = '<tr id="trextrafieldseparator'.$key.'" class="trextrafieldseparator trextrafieldseparator'.$key.'"><td colspan="'.$colspan.'"><strong>';
$out .= $langs->trans($this->attributes[$object->table_element]['label'][$key]);
$out .= '</strong></td></tr>';

View File

@ -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 '</tbody>';
@ -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 "</table>\n";

View File

@ -1025,7 +1025,7 @@ if ($action == 'create')
print "</td></tr>\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;

View File

@ -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 '<tbody>';

View File

@ -906,18 +906,17 @@ if ($action == 'create')
print '<form name="fichinter" action="'.$_SERVER['PHP_SELF'].'" method="POST">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="socid" value='.$soc->id.'>';
print '<input type="hidden" name="action" value="add">';
dol_fiche_head('');
print '<table class="border centpercent">';
print '<input type="hidden" name="socid" value='.$soc->id.'>';
print '<tr><td class="fieldrequired titlefieldcreate">'.$langs->trans("ThirdParty").'</td><td>'.$soc->getNomUrl(1).'</td></tr>';
print '<input type="hidden" name="action" value="add">';
// Ref
print '<tr><td class="fieldrequired">'.$langs->trans('Ref').'</td><td colspan="2">'.$langs->trans("Draft").'</td></tr>';
print '<tr><td class="fieldrequired">'.$langs->trans('Ref').'</td><td>'.$langs->trans("Draft").'</td></tr>';
// Description (must be a textarea and not html must be allowed (used in list view)
print '<tr><td class="tdtop">'.$langs->trans("Description").'</td>';
@ -963,15 +962,15 @@ if ($action == 'create')
// Model
print '<tr>';
print '<td>'.$langs->trans("DefaultModel").'</td>';
print '<td colspan="2">';
print '<td>';
$liste = ModelePDFFicheinter::liste_modeles($db);
print $form->selectarray('model', $liste, $conf->global->FICHEINTER_ADDON_PDF);
print "</td></tr>";
// Public note
print '<tr>';
print '<td tdtop">'.$langs->trans('NotePublic').'</td>';
print '<td colspan="2">';
print '<td class="tdtop">'.$langs->trans('NotePublic').'</td>';
print '<td>';
$doleditor = new DolEditor('note_public', $note_public, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%');
print $doleditor->Create(1);
//print '<textarea name="note_public" cols="80" rows="'.ROWS_3.'">'.$note_public.'</textarea>';
@ -982,7 +981,7 @@ if ($action == 'create')
{
print '<tr>';
print '<td class="tdtop">'.$langs->trans('NotePrivate').'</td>';
print '<td colspan="2">';
print '<td>';
$doleditor = new DolEditor('note_private', $note_private, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%');
print $doleditor->Create(1);
//print '<textarea name="note_private" cols="80" rows="'.ROWS_3.'">'.$note_private.'</textarea>';
@ -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))

View File

@ -1610,15 +1610,13 @@ if ($action == 'create')
print '<tr><td>'.$langs->trans('RefSupplier').'</td><td><input name="refsupplier" type="text"></td>';
print '</tr>';
print '</td></tr>';
// Payment term
print '<tr><td class="nowrap">'.$langs->trans('PaymentConditionsShort').'</td><td colspan="2">';
print '<tr><td class="nowrap">'.$langs->trans('PaymentConditionsShort').'</td><td>';
$form->select_conditions_paiements(isset($_POST['cond_reglement_id']) ? $_POST['cond_reglement_id'] : $cond_reglement_id, 'cond_reglement_id');
print '</td></tr>';
// Payment mode
print '<tr><td>'.$langs->trans('PaymentMode').'</td><td colspan="2">';
print '<tr><td>'.$langs->trans('PaymentMode').'</td><td>';
$form->select_types_paiements(isset($_POST['mode_reglement_id']) ? $_POST['mode_reglement_id'] : $mode_reglement_id, 'mode_reglement_id');
print '</td></tr>';
@ -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 '<tr><td>'.$langs->trans('BankAccount').'</td><td colspan="2">';
print '<tr><td>'.$langs->trans('BankAccount').'</td><td>';
$form->select_comptes($fk_account, 'fk_account', 0, '', 1);
print '</td></tr>';
}
@ -1647,10 +1645,9 @@ if ($action == 'create')
$formproject = new FormProjets($db);
$langs->load('projects');
print '<tr><td>'.$langs->trans('Project').'</td><td colspan="2">';
print '<tr><td>'.$langs->trans('Project').'</td><td>';
$formproject->select_projects((empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS) ? $societe->id : -1), $projectid, 'projectid', 0, 0, 1, 1);
print ' &nbsp; <a href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$soc->id.'&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$societe->id).'"><span class="valignmiddle text-plus-circle">'.$langs->trans("AddProject").'</span><span class="fa fa-plus-circle valignmiddle"></span></a>';
print '</td></tr>';
}
@ -1659,7 +1656,7 @@ if ($action == 'create')
{
print '<tr>';
print '<td><label for="incoterm_id">'.$form->textwithpicto($langs->trans("IncotermLabel"), $object->label_incoterms, 1).'</label></td>';
print '<td colspan="3" class="maxwidthonsmartphone">';
print '<td class="maxwidthonsmartphone">';
print $form->select_incoterms((!empty($object->fk_incoterms) ? $object->fk_incoterms : ''), (!empty($object->location_incoterms) ? $object->location_incoterms : ''));
print '</td></tr>';
}
@ -1669,7 +1666,7 @@ if ($action == 'create')
{
print '<tr>';
print '<td>'.$form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0).'</td>';
print '<td colspan="3" class="maxwidthonsmartphone">';
print '<td class="maxwidthonsmartphone">';
print $form->selectMultiCurrency($currency_code, 'multicurrency_code');
print '</td></tr>';
}
@ -1700,26 +1697,26 @@ if ($action == 'create')
print '<input type="hidden" name="originid" value="'.$objectsrc->id.'">';
$newclassname = $classname;
print '<tr><td>'.$langs->trans($newclassname).'</td><td colspan="2">'.$objectsrc->getNomUrl(1).'</td></tr>';
print '<tr><td>'.$langs->trans('AmountHT').'</td><td colspan="2">'.price($objectsrc->total_ht).'</td></tr>';
print '<tr><td>'.$langs->trans('AmountVAT').'</td><td colspan="2">'.price($objectsrc->total_tva)."</td></tr>";
print '<tr><td>'.$langs->trans($newclassname).'</td><td>'.$objectsrc->getNomUrl(1).'</td></tr>';
print '<tr><td>'.$langs->trans('AmountHT').'</td><td>'.price($objectsrc->total_ht).'</td></tr>';
print '<tr><td>'.$langs->trans('AmountVAT').'</td><td>'.price($objectsrc->total_tva)."</td></tr>";
if ($mysoc->localtax1_assuj == "1" || $objectsrc->total_localtax1 != 0) // Localtax1 RE
{
print '<tr><td>'.$langs->transcountry("AmountLT1", $mysoc->country_code).'</td><td colspan="2">'.price($objectsrc->total_localtax1)."</td></tr>";
print '<tr><td>'.$langs->transcountry("AmountLT1", $mysoc->country_code).'</td><td>'.price($objectsrc->total_localtax1)."</td></tr>";
}
if ($mysoc->localtax2_assuj == "1" || $objectsrc->total_localtax2 != 0) // Localtax2 IRPF
{
print '<tr><td>'.$langs->transcountry("AmountLT2", $mysoc->country_code).'</td><td colspan="2">'.price($objectsrc->total_localtax2)."</td></tr>";
print '<tr><td>'.$langs->transcountry("AmountLT2", $mysoc->country_code).'</td><td>'.price($objectsrc->total_localtax2)."</td></tr>";
}
print '<tr><td>'.$langs->trans('AmountTTC').'</td><td colspan="2">'.price($objectsrc->total_ttc)."</td></tr>";
print '<tr><td>'.$langs->trans('AmountTTC').'</td><td>'.price($objectsrc->total_ttc)."</td></tr>";
if (!empty($conf->multicurrency->enabled))
{
print '<tr><td>'.$langs->trans('MulticurrencyAmountHT').'</td><td colspan="2">'.price($objectsrc->multicurrency_total_ht).'</td></tr>';
print '<tr><td>'.$langs->trans('MulticurrencyAmountVAT').'</td><td colspan="2">'.price($objectsrc->multicurrency_total_tva).'</td></tr>';
print '<tr><td>'.$langs->trans('MulticurrencyAmountTTC').'</td><td colspan="2">'.price($objectsrc->multicurrency_total_ttc).'</td></tr>';
print '<tr><td>'.$langs->trans('MulticurrencyAmountHT').'</td><td>'.price($objectsrc->multicurrency_total_ht).'</td></tr>';
print '<tr><td>'.$langs->trans('MulticurrencyAmountVAT').'</td><td>'.price($objectsrc->multicurrency_total_tva).'</td></tr>';
print '<tr><td>'.$langs->trans('MulticurrencyAmountTTC').'</td><td>'.price($objectsrc->multicurrency_total_ttc).'</td></tr>';
}
}

View File

@ -336,22 +336,22 @@ if ($action == 'create' && !$error) {
print '<table class="border centpercent">';
// Ref
print '<tr><td class="fieldrequired">'.$langs->trans('Ref').'</td><td colspan="2">'.$langs->trans('Draft').'</td></tr>';
print '<tr><td class="fieldrequired">'.$langs->trans('Ref').'</td><td>'.$langs->trans('Draft').'</td></tr>';
// Ref supplier
print '<tr><td class="fieldrequired">'.$langs->trans('RefSupplier').'</td><td><input name="ref_supplier" value="'.dol_escape_htmltag(isset($_POST['ref_supplier']) ? GETPOST('ref_supplier', 'alpha', 2) : '').'" type="text"></td>';
print '</tr>';
// Date invoice
print '<tr><td class="fieldrequired">'.$langs->trans('Date').'</td><td colspan="2">';
print '<tr><td class="fieldrequired">'.$langs->trans('Date').'</td><td>';
print $html->selectDate('', '', '', '', '', "add", 1, 1);
print '</td></tr>';
// Payment term
print '<tr><td class="nowrap">'.$langs->trans('PaymentConditionsShort').'</td><td colspan="2">';
print '<tr><td class="nowrap">'.$langs->trans('PaymentConditionsShort').'</td><td>';
$html->select_conditions_paiements(isset($_POST['cond_reglement_id']) ? $_POST['cond_reglement_id'] : $cond_reglement_id, 'cond_reglement_id');
print '</td></tr>';
// Payment mode
print '<tr><td>'.$langs->trans('PaymentMode').'</td><td colspan="2">';
print '<tr><td>'.$langs->trans('PaymentMode').'</td><td>';
$html->select_types_paiements(isset($_POST['mode_reglement_id']) ? $_POST['mode_reglement_id'] : $mode_reglement_id, 'mode_reglement_id');
print '</td></tr>';
// Project
@ -359,7 +359,7 @@ if ($action == 'create' && !$error) {
$formproject = new FormProjets($db);
$langs->load('projects');
print '<tr><td>'.$langs->trans('Project').'</td><td colspan="2">';
print '<tr><td>'.$langs->trans('Project').'</td><td>';
$formproject->select_projects($soc->id, $projectid, 'projectid');
print '</td></tr>';
}
@ -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 '<tr>';
print '<td class="tdtop">'.$langs->trans('NotePublic').'</td>';
print '<td colspan="2">';
print '<td>';
print '<textarea name="note_public" wrap="soft" class="quatrevingtpercent" rows="'.ROWS_3.'">';
print $langs->trans("Orders").": ".implode(', ', $listoforders);
@ -401,7 +399,7 @@ if ($action == 'create' && !$error) {
if (empty($user->socid)) {
print '<tr>';
print '<td class="tdtop">'.$langs->trans('NotePrivate').'</td>';
print '<td colspan="2">';
print '<td>';
print '<textarea name="note" wrap="soft" cols="70" rows="'.ROWS_3.'">';
print '</textarea></td></tr>';

View File

@ -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))

View File

@ -1274,7 +1274,7 @@ if ($action == 'edit_price' && $object->getRights()->creer)
print '</td>';
print '</tr>';
$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 '</table>';

View File

@ -721,12 +721,12 @@ else
print '</td></tr>';
// 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)

View File

@ -864,7 +864,7 @@ if ($action == 'create')
print "</td></tr>\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

View File

@ -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

View File

@ -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);
}

View File

@ -304,7 +304,7 @@ if ($action == 'create')
print "</td></tr>\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))