Fix colspan
This commit is contained in:
parent
b81c3a6d2b
commit
a138c05457
@ -688,7 +688,9 @@ class FormFile
|
|||||||
$out.= '<tr class="liste_titre">';
|
$out.= '<tr class="liste_titre">';
|
||||||
|
|
||||||
$addcolumforpicto=($delallowed || $printer || $morepicto);
|
$addcolumforpicto=($delallowed || $printer || $morepicto);
|
||||||
$out.= '<th colspan="'.(3+($addcolumforpicto?1:0)).'" class="formdoc liste_titre maxwidthonsmartphone center">';
|
$colspan = (3+($addcolumforpicto?1:0)); $colspanmore = 0;
|
||||||
|
|
||||||
|
$out.= '<th colspan="'.$colspan.'" class="formdoc liste_titre maxwidthonsmartphone center">';
|
||||||
|
|
||||||
// Model
|
// Model
|
||||||
if (! empty($modellist))
|
if (! empty($modellist))
|
||||||
@ -745,13 +747,17 @@ class FormFile
|
|||||||
{
|
{
|
||||||
foreach($hookmanager->hooks['formfile'] as $module)
|
foreach($hookmanager->hooks['formfile'] as $module)
|
||||||
{
|
{
|
||||||
if (method_exists($module, 'formBuilddocLineOptions')) $out .= '<th></th>';
|
if (method_exists($module, 'formBuilddocLineOptions'))
|
||||||
|
{
|
||||||
|
$colspanmore++;
|
||||||
|
$out .= '<th></th>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$out.= '</tr>';
|
$out.= '</tr>';
|
||||||
|
|
||||||
// Execute hooks
|
// Execute hooks
|
||||||
$parameters=array('socid'=>(isset($GLOBALS['socid'])?$GLOBALS['socid']:''),'id'=>(isset($GLOBALS['id'])?$GLOBALS['id']:''),'modulepart'=>$modulepart);
|
$parameters=array('colspan'=>($colspan+$colspanmore), 'socid'=>(isset($GLOBALS['socid'])?$GLOBALS['socid']:''), 'id'=>(isset($GLOBALS['id'])?$GLOBALS['id']:''), 'modulepart'=>$modulepart);
|
||||||
if (is_object($hookmanager))
|
if (is_object($hookmanager))
|
||||||
{
|
{
|
||||||
$reshook = $hookmanager->executeHooks('formBuilddocOptions', $parameters, $GLOBALS['object']);
|
$reshook = $hookmanager->executeHooks('formBuilddocOptions', $parameters, $GLOBALS['object']);
|
||||||
@ -848,14 +854,17 @@ class FormFile
|
|||||||
|
|
||||||
if (is_object($hookmanager))
|
if (is_object($hookmanager))
|
||||||
{
|
{
|
||||||
$parameters=array('socid'=>(isset($GLOBALS['socid'])?$GLOBALS['socid']:''),'id'=>(isset($GLOBALS['id'])?$GLOBALS['id']:''),'modulepart'=>$modulepart,'relativepath'=>$relativepath);
|
$parameters=array('colspan'=>($colspan+$colspanmore), 'socid'=>(isset($GLOBALS['socid'])?$GLOBALS['socid']:''),'id'=>(isset($GLOBALS['id'])?$GLOBALS['id']:''),'modulepart'=>$modulepart,'relativepath'=>$relativepath);
|
||||||
$res = $hookmanager->executeHooks('formBuilddocLineOptions', $parameters, $file);
|
$res = $hookmanager->executeHooks('formBuilddocLineOptions', $parameters, $file);
|
||||||
if (empty($res))
|
if (empty($res))
|
||||||
{
|
{
|
||||||
$out.= $hookmanager->resPrint; // Complete line
|
$out.= $hookmanager->resPrint; // Complete line
|
||||||
$out.= '</tr>';
|
$out.= '</tr>';
|
||||||
}
|
}
|
||||||
else $out = $hookmanager->resPrint; // Replace line
|
else
|
||||||
|
{
|
||||||
|
$out = $hookmanager->resPrint; // Replace all $out
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user