diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php
index 1eaca6d9e92..2f205afbd9c 100644
--- a/htdocs/html.form.class.php
+++ b/htdocs/html.form.class.php
@@ -65,46 +65,75 @@ class Form
/**
+ \brief Affiche un texte+picto avec tooltip sur texte ou sur picto
+ \param text Texte à afficher
+ \param htmltext Contenu html du tooltip
+ \param tooltipon 1=tooltip sur texte, 2=tooltip sur picto, 3=tooltip sur les 2
+ \param direction -1=Le picto est avant, 0=pas de picto, 1=le picto est après
+ \param img Code img du picto
+ \return string Code html du texte,picto
+ */
+ function textwithtooltip($text,$htmltext,$tooltipon=1,$direction=0,$img='')
+ {
+ global $conf;
+
+ if (! $htmltext) return $text;
+
+ $paramfortooltiptext ='';
+ $paramfortooltippicto ='';
+ if ($conf->use_javascript)
+ {
+ // Sanitize tooltip
+ $htmltext=ereg_replace("'","\'",$htmltext);
+ if ($tooltipon==1 || $tooltipon==3)
+ {
+ $paramfortooltiptext.=' onmouseover="showtip(\''.$htmltext.'\')"';
+ $paramfortooltiptext.=' onMouseout="hidetip()"';
+ }
+ if ($tooltipon==2 || $tooltipon==3)
+ {
+ $paramfortooltippicto.=' onmouseover="showtip(\''.$htmltext.'\')"';
+ $paramfortooltippicto.=' onMouseout="hidetip()"';
+ }
+ }
+
+ $s="";
+ $s.='
';
+ if ($direction > 0)
+ {
+ if ($text)
+ {
+ $s.='| '.$text;
+ $s.=' ';
+ $s.=' | ';
+ }
+ if ($direction) $s.=''.$img.' | ';
+ }
+ else
+ {
+ if ($direction) $s.=''.$img.' | ';
+ if ($text)
+ {
+ $s.='';
+ $s.=' ';
+ $s.=$text.' | ';
+ }
+ }
+ $s.='
';
+ return $s;
+ }
+
+ /**
\brief Affiche un texte avec picto help qui affiche un tooltip
\param text Texte à afficher
\param htmltooltip Contenu html du tooltip
\param direction 1=Le picto est après, -1=le picto est avant
\param usehelpcursor 1=Utilise curseur help, 0=Curseur par defaut
\return string Code html du texte,picto
- */
- function textwithhelp($text,$htmltext,$direction=1,$usehelpcursor=1)
+ */
+ function textwithhelp($text,$htmltext,$direction=1,$usehelpcursor=1)
{
- global $conf;
-
- if (! $htmltext)
- {
- return $text;
- }
-
- $s="";
-
- // Sanitize tooltip
- $paramfortooltip ='';
- if ($conf->use_javascript)
- {
- $htmltext=ereg_replace("'","\'",$htmltext);
- $paramfortooltip.=' onmouseover="showtip(\''.$htmltext.'\')"';
- $paramfortooltip.=' onMouseout="hidetip()"';
- }
-
- $s.='';
- if ($direction > 0)
- {
- if ($text) $s.='| '.$text.' | ';
- $s.=''.img_help($usehelpcursor,0).' | ';
- }
- else
- {
- $s.=''.img_help($usehelpcursor,0).' | ';
- if ($text) $s.=' '.$text.' | ';
- }
- $s.='
';
- return $s;
+ return $this->textwithtooltip($text,$htmltext,2,$direction,img_help($usehelpcursor,0));
}
/**
@@ -113,40 +142,10 @@ class Form
\param htmltooltip Contenu html du tooltip
\param direction 1=Le picto est après, -1=le picto est avant
\return string Code html du texte,picto
- */
- function textwithwarning($text,$htmltext,$direction=1)
+ */
+ function textwithwarning($text,$htmltext,$direction=1)
{
- global $conf;
-
- if (! $htmltext)
- {
- return $text;
- }
-
- $s="";
-
- // Sanitize tooltip
- $paramfortooltip ='';
- if ($conf->use_javascript)
- {
- $htmltext=ereg_replace("'","\'",$htmltext);
- $paramfortooltip.=' onmouseover="showtip(\''.$htmltext.'\')"';
- $paramfortooltip.=' onMouseout="hidetip()"';
- }
-
- $s.='';
- if ($direction > 0)
- {
- if ($text) $s.='| '.$text.' | ';
- $s.=''.img_warning("default").' | ';
- }
- else
- {
- $s.=''.img_warning("default").' | ';
- if ($text) $s.=' '.$text.' | ';
- }
- $s.='
';
- return $s;
+ return $this->textwithtooltip($text,$htmltext,2,$direction,img_warning("default"));
}
diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index 7fc82deedfa..d291674c81c 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -600,7 +600,7 @@ function top_htmlhead($head, $title="", $target="")
*/
function top_menu($head, $title="", $target="")
{
- global $user, $conf, $langs, $db;
+ global $user, $conf, $langs, $db, $dolibarr_main_authentication;
if (! $conf->top_menu) $conf->top_menu ='eldy_backoffice.php';
if (! $conf->left_menu) $conf->left_menu='eldy_backoffice.php';
@@ -653,15 +653,24 @@ function top_menu($head, $title="", $target="")
// Lien logout
if (! isset($_SERVER["REMOTE_USER"]) || ! $_SERVER["REMOTE_USER"])
{
- print 'atarget?(' target="'.$menutop->atarget.'"'):'';
- print '>';
$title=$langs->trans("Logout");
- $title.=' ('.$langs->trans("ConnectedSince").': '.dolibarr_print_date($user->datelastlogin,"%d/%m/%Y %H:%M:%S").')';
- print '
';
- print '';
+ $title.='
'.$langs->trans("ConnectedSince").': '.dolibarr_print_date($user->datelastlogin,"%d/%m/%Y %H:%M:%S");
+ $title.='
'.$langs->trans("AuthenticationMode").': '.$dolibarr_main_authentication;
+
+ $text.='atarget?(' target="'.$menutop->atarget.'"'):'';
+ $text.='>';
+ $text.='
';
+ $text.='';
+
+ $html=new Form($db);
+ print $html->textwithtooltip('',$title,2,1,$text);
+
+// print '
';
}
print "\n\n\n";
diff --git a/htdocs/theme/dev/dev.css b/htdocs/theme/dev/dev.css
index be85951a461..346824df1c1 100644
--- a/htdocs/theme/dev/dev.css
+++ b/htdocs/theme/dev/dev.css
@@ -780,7 +780,7 @@ tr.nonpayed {
#dhtmltooltip
{
position: absolute;
-width: 200px;
+width: 300px;
border: 1px solid #444444;
padding: 2px;
background-color: lightyellow;
diff --git a/htdocs/theme/dolibarr/dolibarr.css b/htdocs/theme/dolibarr/dolibarr.css
index 5922320265e..2a7cdb5b984 100644
--- a/htdocs/theme/dolibarr/dolibarr.css
+++ b/htdocs/theme/dolibarr/dolibarr.css
@@ -636,7 +636,7 @@ tr.nonpayed {
#dhtmltooltip
{
position: absolute;
-width: 200px;
+width: 300px;
border: 1px solid #444444;
padding: 2px;
background-color: lightyellow;
diff --git a/htdocs/theme/yellow/yellow.css b/htdocs/theme/yellow/yellow.css
index 5285aa89d18..2ad0bd7c028 100644
--- a/htdocs/theme/yellow/yellow.css
+++ b/htdocs/theme/yellow/yellow.css
@@ -716,7 +716,7 @@ table.valid {
#dhtmltooltip
{
position: absolute;
-width: 200px;
+width: 300px;
border: 1px solid #444444;
padding: 2px;
background-color: lightyellow;