Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
4882615c8a
@ -448,8 +448,6 @@ $sql.=$db->plimit($listlimit+1,$offset);
|
|||||||
$fieldlist=explode(',',$tabfield[$id]);
|
$fieldlist=explode(',',$tabfield[$id]);
|
||||||
|
|
||||||
// Form to add a new line
|
// Form to add a new line
|
||||||
$alabelisused=0;
|
|
||||||
|
|
||||||
print '<form action="'.$_SERVER['PHP_SELF'].'?id='.$id.'" method="POST">';
|
print '<form action="'.$_SERVER['PHP_SELF'].'?id='.$id.'" method="POST">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="from" value="'.dol_escape_htmltag(GETPOST('from','alpha')).'">';
|
print '<input type="hidden" name="from" value="'.dol_escape_htmltag(GETPOST('from','alpha')).'">';
|
||||||
@ -492,7 +490,6 @@ foreach ($fieldlist as $field => $value)
|
|||||||
else print $valuetoshow;
|
else print $valuetoshow;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label') $alabelisused=1;
|
|
||||||
}
|
}
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print '<input type="hidden" name="id" value="' . $id . '">';
|
print '<input type="hidden" name="id" value="' . $id . '">';
|
||||||
@ -535,6 +532,7 @@ print '<td align="right">';
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
|
|
||||||
|
// Show fields for topic, join files and body
|
||||||
$fieldsforcontent = array('topic', 'joinfiles', 'content');
|
$fieldsforcontent = array('topic', 'joinfiles', 'content');
|
||||||
if (! empty($conf->global->MAIN_EMAIL_TEMPLATES_FOR_OBJECT_LINES)) { $fieldsforcontent = array('content','content_lines'); }
|
if (! empty($conf->global->MAIN_EMAIL_TEMPLATES_FOR_OBJECT_LINES)) { $fieldsforcontent = array('content','content_lines'); }
|
||||||
foreach ($fieldsforcontent as $tmpfieldlist)
|
foreach ($fieldsforcontent as $tmpfieldlist)
|
||||||
@ -631,11 +629,11 @@ if ($resql)
|
|||||||
$filterfound=0;
|
$filterfound=0;
|
||||||
foreach ($fieldlist as $field => $value)
|
foreach ($fieldlist as $field => $value)
|
||||||
{
|
{
|
||||||
if ($value == 'label') print '<td class="liste_titre"><input type="text" name="search_label" value="'.dol_escape_htmltag($search_label).'"></td>';
|
if ($value == 'label') print '<td class="liste_titre"><input type="text" name="search_label" class="maxwidth100" value="'.dol_escape_htmltag($search_label).'"></td>';
|
||||||
elseif ($value == 'lang')
|
elseif ($value == 'lang')
|
||||||
{
|
{
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
print $formadmin->select_language($search_lang, 'search_lang', 0, null, 1, 0, 0, 'maxwidth150');
|
print $formadmin->select_language($search_lang, 'search_lang', 0, null, 1, 0, 0, 'maxwidth100');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
elseif ($value == 'fk_user')
|
elseif ($value == 'fk_user')
|
||||||
@ -644,13 +642,13 @@ if ($resql)
|
|||||||
$restrictid=array();
|
$restrictid=array();
|
||||||
if (! $user->admin) $restrictid=array($user->id);
|
if (! $user->admin) $restrictid=array($user->id);
|
||||||
//var_dump($restrictid);
|
//var_dump($restrictid);
|
||||||
print $form->select_dolusers($search_fk_user, 'search_fk_user', 1, null, 0, 'hierarchyme', null, 0, 0, 1, '', 0, '', 'maxwidth200');
|
print $form->select_dolusers($search_fk_user, 'search_fk_user', 1, null, 0, 'hierarchyme', null, 0, 0, 1, '', 0, '', 'maxwidth100');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
elseif ($value == 'topic') print '<td class="liste_titre"><input type="text" name="search_topic" value="'.dol_escape_htmltag($search_topic).'"></td>';
|
elseif ($value == 'topic') print '<td class="liste_titre"><input type="text" name="search_topic" value="'.dol_escape_htmltag($search_topic).'"></td>';
|
||||||
elseif ($value == 'type_template')
|
elseif ($value == 'type_template')
|
||||||
{
|
{
|
||||||
print '<td class="liste_titre">'.$form->selectarray('search_type_template', $elementList, $search_type_template, 1, 0, 0, '', 0, 0, 0, '', 'maxwidth200 maxwidth100onsmartphone').'</td>';
|
print '<td class="liste_titre">'.$form->selectarray('search_type_template', $elementList, $search_type_template, 1, 0, 0, '', 0, 0, 0, '', 'maxwidth100 maxwidth100onsmartphone').'</td>';
|
||||||
}
|
}
|
||||||
elseif (! in_array($value, array('content', 'content_lines'))) print '<td class="liste_titre"></td>';
|
elseif (! in_array($value, array('content', 'content_lines'))) print '<td class="liste_titre"></td>';
|
||||||
}
|
}
|
||||||
@ -672,6 +670,7 @@ if ($resql)
|
|||||||
$align="left";
|
$align="left";
|
||||||
$sortable=1;
|
$sortable=1;
|
||||||
$valuetoshow='';
|
$valuetoshow='';
|
||||||
|
$forcenowrap=1;
|
||||||
/*
|
/*
|
||||||
$tmparray=getLabelOfField($fieldlist[$field]);
|
$tmparray=getLabelOfField($fieldlist[$field]);
|
||||||
$showfield=$tmp['showfield'];
|
$showfield=$tmp['showfield'];
|
||||||
@ -689,7 +688,7 @@ if ($resql)
|
|||||||
if ($fieldlist[$field]=='private') { $align='center'; }
|
if ($fieldlist[$field]=='private') { $align='center'; }
|
||||||
if ($fieldlist[$field]=='position') { $align='center'; }
|
if ($fieldlist[$field]=='position') { $align='center'; }
|
||||||
|
|
||||||
if ($fieldlist[$field]=='joinfiles') { $valuetoshow=$langs->trans("FilesAttachedToEmail"); $align='center'; }
|
if ($fieldlist[$field]=='joinfiles') { $valuetoshow=$langs->trans("FilesAttachedToEmail"); $align='center'; $forcenowrap=0; }
|
||||||
if ($fieldlist[$field]=='content') { $valuetoshow=$langs->trans("Content"); $showfield=0;}
|
if ($fieldlist[$field]=='content') { $valuetoshow=$langs->trans("Content"); $showfield=0;}
|
||||||
if ($fieldlist[$field]=='content_lines') { $valuetoshow=$langs->trans("ContentLines"); $showfield=0; }
|
if ($fieldlist[$field]=='content_lines') { $valuetoshow=$langs->trans("ContentLines"); $showfield=0; }
|
||||||
|
|
||||||
@ -698,8 +697,8 @@ if ($resql)
|
|||||||
{
|
{
|
||||||
if (! empty($tabhelp[$id][$value]))
|
if (! empty($tabhelp[$id][$value]))
|
||||||
{
|
{
|
||||||
if (in_array($value, array('topic'))) $valuetoshow = $form->textwithpicto($valuetoshow, $tabhelp[$id][$value], 1, 'help', '', 0, 2, 'tooltip'.$value); // Tooltip on click
|
if (in_array($value, array('topic'))) $valuetoshow = $form->textwithpicto($valuetoshow, $tabhelp[$id][$value], 1, 'help', '', 0, 2, 'tooltip'.$value, $forcenowrap); // Tooltip on click
|
||||||
else $valuetoshow = $form->textwithpicto($valuetoshow, $tabhelp[$id][$value], 1, 'help', '', 0, 2, '', 1); // Tooltip on hover
|
else $valuetoshow = $form->textwithpicto($valuetoshow, $tabhelp[$id][$value], 1, 'help', '', 0, 2, '', $forcenowrap); // Tooltip on hover
|
||||||
}
|
}
|
||||||
print getTitleFieldOfList($valuetoshow, 0, $_SERVER["PHP_SELF"], ($sortable?$fieldlist[$field]:''), ($page?'page='.$page.'&':''), $param, "align=".$align, $sortfield, $sortorder);
|
print getTitleFieldOfList($valuetoshow, 0, $_SERVER["PHP_SELF"], ($sortable?$fieldlist[$field]:''), ($page?'page='.$page.'&':''), $param, "align=".$align, $sortfield, $sortorder);
|
||||||
}
|
}
|
||||||
@ -1024,7 +1023,7 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='')
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print $form->selectarray('type_template', $elementList, (! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:''), 1, 0, 0, '', 0, 0, 0, '', 'maxwidth200');
|
print $form->selectarray('type_template', $elementList, (! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:''), 1, 0, 0, '', 0, 0, 0, '', 'maxwidth150 maxwidth100onsmartphone');
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
@ -1035,6 +1034,7 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='')
|
|||||||
{
|
{
|
||||||
$size=''; $class=''; $classtd='';
|
$size=''; $class=''; $classtd='';
|
||||||
if ($fieldlist[$field]=='code') $class='maxwidth100';
|
if ($fieldlist[$field]=='code') $class='maxwidth100';
|
||||||
|
if ($fieldlist[$field]=='label') $class='maxwidth100';
|
||||||
if ($fieldlist[$field]=='private') { $class='maxwidth50'; $classtd='center'; }
|
if ($fieldlist[$field]=='private') { $class='maxwidth50'; $classtd='center'; }
|
||||||
if ($fieldlist[$field]=='position') { $class='maxwidth50'; $classtd='center'; }
|
if ($fieldlist[$field]=='position') { $class='maxwidth50'; $classtd='center'; }
|
||||||
if ($fieldlist[$field]=='libelle') $class='quatrevingtpercent';
|
if ($fieldlist[$field]=='libelle') $class='quatrevingtpercent';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user