diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 1ecc6dc9aea..4ea63ed8081 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -376,7 +376,7 @@ class Form
* @return string Code html du tooltip (texte+picto)
* @see Use function textwithpicto if you can.
*/
- function textwithtooltip($text, $htmltext, $tooltipon = 1, $direction = 0, $img = '', $extracss = '', $notabs = 0, $incbefore = '', $noencodehtmltext = 0)
+ function textwithtooltip($text, $htmltext, $tooltipon = 1, $direction = 0, $img = '', $extracss = '', $notabs = 2, $incbefore = '', $noencodehtmltext = 0)
{
global $conf;
@@ -391,14 +391,19 @@ class Form
$htmltext=str_replace("\r","",$htmltext);
$htmltext=str_replace("\n","",$htmltext);
+ $extrastyle='';
+ if ($direction < 0) { $extracss=($extracss?$extracss.' ':'').'inline-block'; $extrastyle='padding: 0px; padding-left: 3px !important;'; }
+ if ($direction > 0) { $extracss=($extracss?$extracss.' ':'').'inline-block'; $extrastyle='padding: 0px; padding-right: 3px !important;'; }
+
$htmltext=str_replace('"',""",$htmltext);
- if ($tooltipon == 2 || $tooltipon == 3) $paramfortooltipimg=' class="classfortooltip inline-block'.($extracss?' '.$extracss:'').'" style="padding: 0px;" title="'.($noencodehtmltext?$htmltext:dol_escape_htmltag($htmltext,1)).'"'; // Attribut to put on td img tag to store tooltip
- else $paramfortooltipimg =($extracss?' class="'.$extracss.'"':''); // Attribut to put on td text tag
- if ($tooltipon == 1 || $tooltipon == 3) $paramfortooltiptd=' class="classfortooltip inline-block'.($extracss?' '.$extracss:'').'" style="padding: 0px;" title="'.($noencodehtmltext?$htmltext:dol_escape_htmltag($htmltext,1)).'"'; // Attribut to put on td tag to store tooltip
- else $paramfortooltiptd =($extracss?' class="'.$extracss.'"':''); // Attribut to put on td text tag
+ if ($tooltipon == 2 || $tooltipon == 3) $paramfortooltipimg=' class="classfortooltip inline-block'.($extracss?' '.$extracss:'').'" style="padding: 0px;'.($extrastyle?' '.$extrastyle:'').'" title="'.($noencodehtmltext?$htmltext:dol_escape_htmltag($htmltext,1)).'"'; // Attribut to put on td img tag to store tooltip
+ else $paramfortooltipimg =($extracss?' class="'.$extracss.'"':'').($extrastyle?' style="'.$extrastyle.'"':''); // Attribut to put on td text tag
+ if ($tooltipon == 1 || $tooltipon == 3) $paramfortooltiptd=' class="classfortooltip inline-block'.($extracss?' '.$extracss:'').'" style="padding: 0px;'.($extrastyle?' '.$extrastyle:'').'" title="'.($noencodehtmltext?$htmltext:dol_escape_htmltag($htmltext,1)).'"'; // Attribut to put on td tag to store tooltip
+ else $paramfortooltiptd =($extracss?' class="'.$extracss.'"':'').($extrastyle?' style="'.$extrastyle.'"':''); // Attribut to put on td text tag
$s="";
if (empty($notabs)) $s.='
';
elseif ($notabs == 2) $s.='';
+ // Define value if value is before
if ($direction < 0) {
$s.='<'.$tag.$paramfortooltipimg;
if ($tag == 'td') {
@@ -407,16 +412,12 @@ class Form
$s.= '>'.$img.''.$tag.'>';
}
// Use another method to help avoid having a space in value in order to use this value with jquery
- // TODO add this in css
- //if ($text != '') $s.='<'.$tag.$paramfortooltiptd.'>'.(($direction < 0)?' ':'').$text.(($direction > 0)?' ':'').''.$tag.'>';
- $paramfortooltiptd.= (($direction < 0)?' class="inline-block" style="padding: 0px; padding-left: 3px !important;"':'');
- $paramfortooltiptd.= (($direction > 0)?' class="inline-block" style="padding: 0px; padding-right: 3px !important;"':'');
+ // Define label
if ((string) $text != '') $s.='<'.$tag.$paramfortooltiptd.'>'.$text.''.$tag.'>';
+ // Define value if value is after
if ($direction > 0) {
$s.='<'.$tag.$paramfortooltipimg;
- if ($tag == 'td') {
- $s .= ' valign="middle" width="14"';
- }
+ if ($tag == 'td') $s .= ' valign="middle" width="14"';
$s.= '>'.$img.''.$tag.'>';
}
if (empty($notabs)) $s.='
';
@@ -437,7 +438,7 @@ class Form
* @param int $notabs 0=Include table and tr tags, 1=Do not include table and tr tags, 2=use div, 3=use span
* @return string HTML code of text, picto, tooltip
*/
- function textwithpicto($text, $htmltext, $direction = 1, $type = 'help', $extracss = '', $noencodehtmltext = 0, $notabs = 0)
+ function textwithpicto($text, $htmltext, $direction = 1, $type = 'help', $extracss = '', $noencodehtmltext = 0, $notabs = 2)
{
global $conf;
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index f5cc4188981..3ad22c66695 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -2186,7 +2186,7 @@ function img_help($usehelpcursor = 1, $usealttitle = 1)
else $usealttitle = $langs->trans('Info');
}
- return img_picto($usealttitle, 'info.png', ($usehelpcursor ? 'style="cursor: help"' : ''));
+ return img_picto($usealttitle, 'info.png', ($usehelpcursor ? 'style="vertical-align: middle; cursor: help"' : 'style="vertical-align: middle;"'));
}
/**
@@ -2201,7 +2201,7 @@ function img_info($titlealt = 'default')
if ($titlealt == 'default') $titlealt = $langs->trans('Informations');
- return img_picto($titlealt, 'info.png');
+ return img_picto($titlealt, 'info.png', 'style="vertical-align: middle;"');
}
/**
diff --git a/htdocs/langs/en_US/salaries.lang b/htdocs/langs/en_US/salaries.lang
index 0f5f636a3f3..953a9c7540c 100644
--- a/htdocs/langs/en_US/salaries.lang
+++ b/htdocs/langs/en_US/salaries.lang
@@ -10,4 +10,6 @@ SalariesPayments=Salaries payments
ShowSalaryPayment=Show salary payment
THM=Average hourly price
TJM=Average daily price
-CurrentSalary=Current salary
\ No newline at end of file
+CurrentSalary=Current salary
+THMDescription=This value may be used to calculate cost of time consumed on a project entered by users if module project is used
+TJMDescription=This value is currently as information only and is not used for any calculation
diff --git a/htdocs/user/card.php b/htdocs/user/card.php
index ace75333ba6..42919207f21 100644
--- a/htdocs/user/card.php
+++ b/htdocs/user/card.php
@@ -1272,10 +1272,12 @@ else
print ''."\n";
// Type
- print '| '.$langs->trans("Type").' | ';
+ print ' |
| ';
+ $text=$langs->trans("Type");
+ print $form->textwithpicto($text, $langs->trans("InternalExternalDesc"));
+ print ' | ';
$type=$langs->trans("Internal");
if ($object->societe_id) $type=$langs->trans("External");
- print $form->textwithpicto($type, $langs->trans("InternalExternalDesc"), 1, 'help', '', 0, 2);
if ($object->ldap_sid) print ' ('.$langs->trans("DomainUser").')';
print ' |
'."\n";
@@ -1337,14 +1339,20 @@ else
$langs->load("salaries");
// THM
- print '| '.$langs->trans("THM").' | ';
+ print '
| ';
+ $text=$langs->trans("THM");
+ print $form->textwithpicto($text, $langs->trans("THMDescription"), 1, 'help', 'classthm');
+ print ' | ';
print '';
print ($object->thm!=''?price($object->thm,'',$langs,1,-1,-1,$conf->currency):'');
print ' | ';
print "
\n";
// TJM
- print '| '.$langs->trans("TJM").' | ';
+ print '
| ';
+ $text=$langs->trans("TJM");
+ print $form->textwithpicto($text, $langs->trans("TJMDescription"), 1, 'help', 'classtjm');
+ print ' | ';
print '';
print ($object->tjm!=''?price($object->tjm,'',$langs,1,-1,-1,$conf->currency):'');
print ' | ';