Browse Source

Better behavior for tooltip on click

Laurent Destailleur 8 years ago
parent
commit
7d5b5cf86a
2 changed files with 7 additions and 5 deletions
  1. 3 2
      htdocs/core/class/html.form.class.php
  2. 4 3
      htdocs/langs/en_US/main.lang

+ 3 - 2
htdocs/core/class/html.form.class.php

@@ -492,10 +492,11 @@ class Form
      */
     function textwithpicto($text, $htmltext, $direction = 1, $type = 'help', $extracss = '', $noencodehtmltext = 0, $notabs = 2, $tooltiptrigger='')
     {
-        global $conf;
+        global $conf, $langs;
 
         $alt = '';
-
+        if ($tooltiptrigger) $alt=$langs->trans("ClickToShowHelp");
+        
         //For backwards compatibility
         if ($type == '0') $type = 'info';
         elseif ($type == '1') $type = 'help';

+ 4 - 3
htdocs/langs/en_US/main.lang

@@ -766,6 +766,9 @@ Download=Download
 ActualizeCurrency=Update currency rate
 Fiscalyear=Fiscal year
 ModuleBuilder=Module Builder
+SetMultiCurrencyCode=Set currency
+BulkActions=Bulk actions
+ClickToShowHelp=Click to show tooltip help
 # Week day
 Monday=Monday
 Tuesday=Tuesday
@@ -822,6 +825,4 @@ SearchIntoInterventions=Interventions
 SearchIntoContracts=Contracts
 SearchIntoCustomerShipments=Customer shipments
 SearchIntoExpenseReports=Expense reports
-SearchIntoLeaves=Leaves
-SetMultiCurrencyCode=Set currency
-BulkActions=Bulk actions
+SearchIntoLeaves=Leaves