FIX cols parameter not propagated to tpl
This commit is contained in:
parent
7b170ff4e6
commit
d956222e36
@ -176,6 +176,7 @@ class Canvas
|
||||
global $db, $conf, $langs, $user, $canvas;
|
||||
global $form, $formfile;
|
||||
|
||||
//var_dump($this->card.'-'.$action);
|
||||
include $this->template_dir.(!empty($this->card)?$this->card.'_':'').$this->_cleanaction($action).'.tpl.php'; // Include native PHP template
|
||||
}
|
||||
|
||||
|
||||
@ -6798,7 +6798,8 @@ abstract class CommonObject
|
||||
if ($mode != 'view' && !empty($extrafields->attributes[$this->table_element]['required'][$key])) $out .= ' <font color="red">*</font>';
|
||||
} else {
|
||||
if ($mode != 'view' && !empty($extrafields->attributes[$this->table_element]['required'][$key])) $out .= ' fieldrequired';
|
||||
$out .= '">';
|
||||
$out .= '"';
|
||||
$out .= '>';
|
||||
if (!empty($extrafields->attributes[$this->table_element]['help'][$key])) $out .= $form->textwithpicto($labeltoshow, $extrafields->attributes[$this->table_element]['help'][$key]);
|
||||
else $out .= $labeltoshow;
|
||||
}
|
||||
|
||||
@ -37,11 +37,14 @@ if (empty($conf) || !is_object($conf))
|
||||
<?php
|
||||
|
||||
// Other attributes
|
||||
$parameters = array();
|
||||
if (! isset($parameters)) $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)) {
|
||||
$params = isset($tpl_context) ? array('tpl_context' => $tpl_context) : array(); // BUG #11554 : Add tpl_context in params
|
||||
$params = array();
|
||||
if (isset($tpl_context)) $params['tpl_context'] = $tpl_context;
|
||||
$params['cols']=$parameters['colspanvalue'];
|
||||
print $object->showOptionals($extrafields, 'edit', $params); // BUG #11554 : Add context in params
|
||||
}
|
||||
|
||||
|
||||
@ -37,11 +37,13 @@ if (empty($conf) || ! is_object($conf))
|
||||
<?php
|
||||
|
||||
// Other attributes
|
||||
$parameters = array();
|
||||
if (! isset($parameters)) $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)) {
|
||||
print $object->showOptionals($extrafields, 'edit');
|
||||
$params=array();
|
||||
$params['cols']=$parameters['colspanvalue'];
|
||||
print $object->showOptionals($extrafields, 'edit', $params);
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@ -1557,14 +1557,9 @@ else
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Other attributes
|
||||
$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', $parameters);
|
||||
}
|
||||
// Other attributes
|
||||
$parameters = array('socid'=>$socid, 'colspan' => ' colspan="3"', 'colspanvalue' => '3');
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_create.tpl.php';
|
||||
|
||||
// Assign a sale representative
|
||||
print '<tr>';
|
||||
@ -2218,14 +2213,9 @@ else
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Other attributes
|
||||
$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', $parameters);
|
||||
}
|
||||
// Other attributes
|
||||
$parameters = array('socid'=>$socid, 'colspan' => ' colspan="3"', 'colspanvalue' => '3');
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_edit.tpl.php';
|
||||
|
||||
// Webservices url/key
|
||||
if (!empty($conf->syncsupplierwebservices->enabled)) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user