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