Fix module builder
This commit is contained in:
parent
c8970c0283
commit
1e90a06ecb
@ -372,12 +372,18 @@ print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"")
|
|||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
foreach($object->fields as $key => $val)
|
foreach($object->fields as $key => $val)
|
||||||
{
|
{
|
||||||
$cssforfield='';
|
$cssforfield=(empty($val['css'])?'':$val['css']);
|
||||||
if (in_array($val['type'], array('date','datetime','timestamp'))) $cssforfield.=($cssforfield?' ':'').'center';
|
if ($key == 'status') $cssforfield='center';
|
||||||
if (in_array($val['type'], array('timestamp'))) $cssforfield.=($cssforfield?' ':'').'nowrap';
|
elseif (in_array($val['type'], array('date','datetime','timestamp'))) $cssforfield.=($cssforfield?' ':'').'center';
|
||||||
if (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real'))) $cssforfield.=($cssforfield?' ':'').'right';
|
elseif (in_array($val['type'], array('timestamp'))) $cssforfield.=($cssforfield?' ':'').'nowrap';
|
||||||
if ($key == 'status') $cssforfield.=($cssforfield?' ':'').'center';
|
elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real'))) $cssforfield.=($cssforfield?' ':'').'right';
|
||||||
if (! empty($arrayfields['t.'.$key]['checked'])) print '<td class="liste_titre'.($cssforfield?' '.$cssforfield:'').'"><input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag($search[$key]).'"></td>';
|
if (! empty($arrayfields['t.'.$key]['checked']))
|
||||||
|
{
|
||||||
|
print '<td class="liste_titre'.($cssforfield?' '.$cssforfield:'').'">';
|
||||||
|
if (is_array($val['arrayofkeyval'])) print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 0, 0, 0, '', 'maxwidth75');
|
||||||
|
else print '<input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag($search[$key]).'">';
|
||||||
|
print '</td>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Extra fields
|
// Extra fields
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
|
||||||
@ -399,11 +405,11 @@ print '</tr>'."\n";
|
|||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
foreach($object->fields as $key => $val)
|
foreach($object->fields as $key => $val)
|
||||||
{
|
{
|
||||||
$cssforfield='';
|
$cssforfield=(empty($val['css'])?'':$val['css']);
|
||||||
if (in_array($val['type'], array('date','datetime','timestamp'))) $cssforfield.=($cssforfield?' ':'').'center';
|
|
||||||
if (in_array($val['type'], array('timestamp'))) $cssforfield.=($cssforfield?' ':'').'nowrap';
|
|
||||||
if (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real'))) $cssforfield.=($cssforfield?' ':'').'right';
|
|
||||||
if ($key == 'status') $cssforfield.=($cssforfield?' ':'').'center';
|
if ($key == 'status') $cssforfield.=($cssforfield?' ':'').'center';
|
||||||
|
elseif (in_array($val['type'], array('date','datetime','timestamp'))) $cssforfield.=($cssforfield?' ':'').'center';
|
||||||
|
elseif (in_array($val['type'], array('timestamp'))) $cssforfield.=($cssforfield?' ':'').'nowrap';
|
||||||
|
elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real'))) $cssforfield.=($cssforfield?' ':'').'right';
|
||||||
if (! empty($arrayfields['t.'.$key]['checked']))
|
if (! empty($arrayfields['t.'.$key]['checked']))
|
||||||
{
|
{
|
||||||
print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield?'class="'.$cssforfield.'"':''), $sortfield, $sortorder, ($cssforfield?$cssforfield.' ':''))."\n";
|
print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield?'class="'.$cssforfield.'"':''), $sortfield, $sortorder, ($cssforfield?$cssforfield.' ':''))."\n";
|
||||||
@ -451,24 +457,16 @@ while ($i < min($num, $limit))
|
|||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
foreach($object->fields as $key => $val)
|
foreach($object->fields as $key => $val)
|
||||||
{
|
{
|
||||||
$cssforfield='';
|
$cssforfield=(empty($val['css'])?'':$val['css']);
|
||||||
if (in_array($val['type'], array('date','datetime','timestamp'))) $cssforfield.=($cssforfield?' ':'').'center';
|
if ($key == 'status') $cssforfield.=($cssforfield?' ':'').'center';
|
||||||
elseif ($key == 'status') $cssforfield.=($cssforfield?' ':'').'center';
|
|
||||||
|
|
||||||
if (in_array($val['type'], array('timestamp'))) $cssforfield.=($cssforfield?' ':'').'nowrap';
|
|
||||||
elseif ($key == 'ref') $cssforfield.=($cssforfield?' ':'').'nowrap';
|
elseif ($key == 'ref') $cssforfield.=($cssforfield?' ':'').'nowrap';
|
||||||
|
elseif (in_array($val['type'], array('date','datetime','timestamp'))) $cssforfield.=($cssforfield?' ':'').'center';
|
||||||
if (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real'))) $cssforfield.=($cssforfield?' ':'').'right';
|
elseif (in_array($val['type'], array('timestamp'))) $cssforfield.=($cssforfield?' ':'').'nowrap';
|
||||||
|
elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real'))) $cssforfield.=($cssforfield?' ':'').'right';
|
||||||
|
|
||||||
if (! empty($arrayfields['t.'.$key]['checked']))
|
if (! empty($arrayfields['t.'.$key]['checked']))
|
||||||
{
|
{
|
||||||
print '<td';
|
print '<td'.($cssforfield ? ' class="'.$cssforfield.'"' : '').'>';
|
||||||
if ($cssforfield || $val['css']) print ' class="';
|
|
||||||
print $cssforfield;
|
|
||||||
if ($cssforfield && $val['css']) print ' ';
|
|
||||||
print $val['css'];
|
|
||||||
if ($cssforfield || $val['css']) print '"';
|
|
||||||
print '>';
|
|
||||||
if ($key == 'status') print $object->getLibStatut(5);
|
if ($key == 'status') print $object->getLibStatut(5);
|
||||||
elseif (in_array($val['type'], array('date','datetime','timestamp'))) print $object->showOutputField($val, $key, $db->jdate($obj->$key), '');
|
elseif (in_array($val['type'], array('date','datetime','timestamp'))) print $object->showOutputField($val, $key, $db->jdate($obj->$key), '');
|
||||||
else print $object->showOutputField($val, $key, $obj->$key, '');
|
else print $object->showOutputField($val, $key, $obj->$key, '');
|
||||||
|
|||||||
@ -413,12 +413,18 @@ print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"")
|
|||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
foreach($object->fields as $key => $val)
|
foreach($object->fields as $key => $val)
|
||||||
{
|
{
|
||||||
$cssforfield='';
|
$cssforfield=(empty($val['css'])?'':$val['css']);
|
||||||
if (in_array($val['type'], array('date','datetime','timestamp'))) $cssforfield.=($cssforfield?' ':'').'center';
|
|
||||||
if (in_array($val['type'], array('timestamp'))) $cssforfield.=($cssforfield?' ':'').'nowrap';
|
|
||||||
if (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price'))) $cssforfield.=($cssforfield?' ':'').'right';
|
|
||||||
if ($key == 'status') $cssforfield.=($cssforfield?' ':'').'center';
|
if ($key == 'status') $cssforfield.=($cssforfield?' ':'').'center';
|
||||||
if (! empty($arrayfields['t.'.$key]['checked'])) print '<td class="liste_titre'.($cssforfield?' '.$cssforfield:'').'"><input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag($search[$key]).'"></td>';
|
elseif (in_array($val['type'], array('date','datetime','timestamp'))) $cssforfield.=($cssforfield?' ':'').'center';
|
||||||
|
elseif (in_array($val['type'], array('timestamp'))) $cssforfield.=($cssforfield?' ':'').'nowrap';
|
||||||
|
elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price'))) $cssforfield.=($cssforfield?' ':'').'right';
|
||||||
|
if (! empty($arrayfields['t.'.$key]['checked']))
|
||||||
|
{
|
||||||
|
print '<td class="liste_titre'.($cssforfield?' '.$cssforfield:'').'">';
|
||||||
|
if (is_array($val['arrayofkeyval'])) print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 0, 0, 0, '', 'maxwidth75');
|
||||||
|
else print '<input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag($search[$key]).'">';
|
||||||
|
print '</td>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Extra fields
|
// Extra fields
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
|
||||||
@ -440,11 +446,11 @@ print '</tr>'."\n";
|
|||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
foreach($object->fields as $key => $val)
|
foreach($object->fields as $key => $val)
|
||||||
{
|
{
|
||||||
$cssforfield='';
|
$cssforfield=(empty($val['css'])?'':$val['css']);
|
||||||
if (in_array($val['type'], array('date','datetime','timestamp'))) $cssforfield.=($cssforfield?' ':'').'center';
|
|
||||||
if (in_array($val['type'], array('timestamp'))) $cssforfield.=($cssforfield?' ':'').'nowrap';
|
|
||||||
if (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price'))) $cssforfield.=($cssforfield?' ':'').'right';
|
|
||||||
if ($key == 'status') $cssforfield.=($cssforfield?' ':'').'center';
|
if ($key == 'status') $cssforfield.=($cssforfield?' ':'').'center';
|
||||||
|
elseif (in_array($val['type'], array('date','datetime','timestamp'))) $cssforfield.=($cssforfield?' ':'').'center';
|
||||||
|
elseif (in_array($val['type'], array('timestamp'))) $cssforfield.=($cssforfield?' ':'').'nowrap';
|
||||||
|
elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price'))) $cssforfield.=($cssforfield?' ':'').'right';
|
||||||
if (! empty($arrayfields['t.'.$key]['checked']))
|
if (! empty($arrayfields['t.'.$key]['checked']))
|
||||||
{
|
{
|
||||||
print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield?'class="'.$cssforfield.'"':''), $sortfield, $sortorder, ($cssforfield?$cssforfield.' ':''))."\n";
|
print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield?'class="'.$cssforfield.'"':''), $sortfield, $sortorder, ($cssforfield?$cssforfield.' ':''))."\n";
|
||||||
@ -492,7 +498,7 @@ while ($i < min($num, $limit))
|
|||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
foreach($object->fields as $key => $val)
|
foreach($object->fields as $key => $val)
|
||||||
{
|
{
|
||||||
$cssforfield='';
|
$cssforfield=(empty($val['css'])?'':$val['css']);
|
||||||
if (in_array($val['type'], array('date','datetime','timestamp'))) $cssforfield.=($cssforfield?' ':'').'center';
|
if (in_array($val['type'], array('date','datetime','timestamp'))) $cssforfield.=($cssforfield?' ':'').'center';
|
||||||
elseif ($key == 'status') $cssforfield.=($cssforfield?' ':'').'center';
|
elseif ($key == 'status') $cssforfield.=($cssforfield?' ':'').'center';
|
||||||
|
|
||||||
@ -503,13 +509,7 @@ while ($i < min($num, $limit))
|
|||||||
|
|
||||||
if (! empty($arrayfields['t.'.$key]['checked']))
|
if (! empty($arrayfields['t.'.$key]['checked']))
|
||||||
{
|
{
|
||||||
print '<td';
|
print '<td'.($cssforfield ? ' class="'.$cssforfield.'"' : '').'>';
|
||||||
if ($cssforfield || $val['css']) print ' class="';
|
|
||||||
print $cssforfield;
|
|
||||||
if ($cssforfield && $val['css']) print ' ';
|
|
||||||
print $val['css'];
|
|
||||||
if ($cssforfield || $val['css']) print '"';
|
|
||||||
print '>';
|
|
||||||
if ($key == 'status') print $object->getLibStatut(5);
|
if ($key == 'status') print $object->getLibStatut(5);
|
||||||
elseif (in_array($val['type'], array('date','datetime','timestamp'))) print $object->showOutputField($val, $key, $db->jdate($obj->$key), '');
|
elseif (in_array($val['type'], array('date','datetime','timestamp'))) print $object->showOutputField($val, $key, $db->jdate($obj->$key), '');
|
||||||
else print $object->showOutputField($val, $key, $obj->$key, '');
|
else print $object->showOutputField($val, $key, $obj->$key, '');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user