diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php
index 2ad74cb1b61..cec34b94e0f 100644
--- a/htdocs/html.form.class.php
+++ b/htdocs/html.form.class.php
@@ -68,6 +68,7 @@ class Form
*/
function textwithhelp($text,$htmltext,$tooltipon=1)
{
+ global $conf;
return $this->textwithtooltip($text,$htmltext,$tooltipon);
}
@@ -172,11 +173,24 @@ class Form
if ("$type" == "0") $type='info'; // For backward compatibility
$alt='';
- if (empty($conf->use_javascript_ajax)) $alt='Help disabled (javascript disabled)';
+ // If info or help with no javascript, show only text
+ if (empty($conf->use_javascript_ajax))
+ {
+ if ($type == 'info' || $type == 'help') return $text;
+ else { $alt=$htmltext; $htmltext=''; }
+ }
+ // If info or help with smartphone, show only text
+ if (! empty($conf->browser->phone))
+ {
+ if ($type == 'info' || $type == 'help') return $text;
+ }
+ // Info or help
if ($type == 'info') $img=img_help(0,$alt);
if ($type == 'help' || $type ==1) $img=img_help(1,$alt);
- if ($type == 'warning') $img=img_warning($alt);
if ($type == 'superadmin') $img=img_redstar($alt);
+ // Warnings
+ if ($type == 'warning') $img=img_warning($alt);
+
return $this->textwithtooltip($text,$htmltext,2,$direction,$img);
}
diff --git a/htdocs/lib/functions.lib.php b/htdocs/lib/functions.lib.php
index 2c74993f000..634e25a85d0 100644
--- a/htdocs/lib/functions.lib.php
+++ b/htdocs/lib/functions.lib.php
@@ -1055,32 +1055,32 @@ function img_action($alt = "default", $numaction)
if ($numaction == 2) $alt=$langs->trans("ChangeContactInProcess");
if ($numaction == 3) $alt=$langs->trans("ChangeContactDone");
}
- return '
';
+ return '
';
}
/**
- \brief Affiche logo fichier
- \param alt Texte sur le alt de l'image
- \return string Retourne tag img
+ * \brief Affiche logo fichier
+ * \param alt Texte sur le alt de l'image
+ * \return string Retourne tag img
*/
function img_file($alt = "default")
{
global $conf,$langs;
if ($alt=="default") $alt=$langs->trans("Show");
- return '
';
+ return '
';
}
/**
- \brief Affiche logo refresh
- \param alt Texte sur le alt de l'image
- \return string Retourne tag img
+ * \brief Affiche logo refresh
+ * \param alt Texte sur le alt de l'image
+ * \return string Retourne tag img
*/
function img_refresh($alt = "default")
{
global $conf,$langs;
if ($alt=="default") $alt=$langs->trans("Refresh");
- return '
';
+ return '
';
}
/**
@@ -1092,7 +1092,7 @@ function img_folder($alt = "default")
{
global $conf,$langs;
if ($alt=="default") $alt=$langs->trans("Dossier");
- return '
';
+ return '
';
}
/**
@@ -1104,7 +1104,7 @@ function img_file_new($alt = "default")
{
global $conf,$langs;
if ($alt=="default") $alt=$langs->trans("Show");
- return '
';
+ return '
';
}
/**
@@ -1117,7 +1117,7 @@ function img_pdf($alt = "default",$size=3)
{
global $conf,$langs;
if ($alt=="default") $alt=$langs->trans("Show");
- return '
';
+ return '
';
}
/**
@@ -1129,7 +1129,7 @@ function img_edit_add($alt = "default")
{
global $conf,$langs;
if ($alt=="default") $alt=$langs->trans("Add");
- return '
';
+ return '
';
}
/**
* \brief Affiche logo -
@@ -1140,7 +1140,7 @@ function img_edit_remove($alt = "default")
{
global $conf,$langs;
if ($alt=="default") $alt=$langs->trans("Remove");
- return '
';
+ return '
';
}
/**
@@ -1153,7 +1153,7 @@ function img_edit($alt = "default", $float=0, $other='')
{
global $conf,$langs;
if ($alt=="default") $alt=$langs->trans("Modify");
- $img='
';
@@ -1170,7 +1170,7 @@ function img_view($alt = "default", $float=0, $other='')
{
global $conf,$langs;
if ($alt=="default") $alt=$langs->trans("View");
- $img='
';
@@ -1186,7 +1186,7 @@ function img_delete($alt = "default")
{
global $conf,$langs;
if ($alt=="default") $alt=$langs->trans("Delete");
- return '
';
+ return '
';
}
@@ -1204,7 +1204,7 @@ function img_help($usehelpcursor=1,$usealttitle=1)
$s.='src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/info.png" border="0"';
if ($usealttitle)
{
- if (is_string($usealttitle)) $s.=' alt="'.$usealttitle.'" title="'.$usealttitle.'"';
+ if (is_string($usealttitle)) $s.=' alt="'.dol_escape_htmltag($usealttitle).'" title="'.dol_escape_htmltag($usealttitle).'"';
else $s.=' alt="'.$langs->trans("Info").'" title="'.$langs->trans("Info").'"';
}
else $s.=' alt=""';
@@ -1221,7 +1221,7 @@ function img_info($alt = "default")
{
global $conf,$langs;
if ($alt=="default") $alt=$langs->trans("Informations");
- return '
';
+ return '
';
}
/**
@@ -1234,7 +1234,7 @@ function img_warning($alt = "default",$float=0)
{
global $conf,$langs;
if ($alt=="default") $alt=$langs->trans("Warning");
- $img='
';
@@ -1251,7 +1251,7 @@ function img_redstar($alt = "default",$float=0)
{
global $conf,$langs;
if ($alt=="default") $alt=$langs->trans("SuperAdministrator");
- $img='
';
@@ -1267,7 +1267,7 @@ function img_error($alt = "default")
{
global $conf,$langs;
if ($alt=="default") $alt=$langs->trans("Error");
- return '
';
+ return '
';
}
/**
@@ -1283,14 +1283,14 @@ function img_phone($alt = "default",$option=0)
$img='call_out';
if ($option == 1) $img='call';
$img='object_commercial';
- return '
';
+ return '
';
}
/**
- \brief Affiche logo suivant
- \param alt Texte sur le alt de l'image
- \return string Retourne tag img
+ * \brief Affiche logo suivant
+ * \param alt Texte sur le alt de l'image
+ * \return string Retourne tag img
*/
function img_next($alt = "default")
{
@@ -1298,93 +1298,93 @@ function img_next($alt = "default")
if ($alt=="default") {
$alt=$langs->trans("Next");
}
- return '
';
+ return '
';
}
/**
- \brief Affiche logo precedent
- \param alt Texte sur le alt de l'image
- \return string Retourne tag img
+ * \brief Affiche logo precedent
+ * \param alt Texte sur le alt de l'image
+ * \return string Retourne tag img
*/
function img_previous($alt = "default")
{
global $conf,$langs;
if ($alt=="default") $alt=$langs->trans("Previous");
- return '
';
+ return '
';
}
/**
- \brief Affiche logo bas
- \param alt Texte sur le alt de l'image
- \param selected Affiche version "selected" du logo
- \return string Retourne tag img
+ * \brief Affiche logo bas
+ * \param alt Texte sur le alt de l'image
+ * \param selected Affiche version "selected" du logo
+ * \return string Retourne tag img
*/
function img_down($alt = "default", $selected=0)
{
global $conf,$langs;
if ($alt=="default") $alt=$langs->trans("Down");
- if ($selected) return '
';
- else return '
';
+ if ($selected) return '
';
+ else return '
';
}
/**
- \brief Affiche logo haut
- \param alt Texte sur le alt de l'image
- \param selected Affiche version "selected" du logo
- \return string Retourne tag img
+ * \brief Affiche logo haut
+ * \param alt Texte sur le alt de l'image
+ * \param selected Affiche version "selected" du logo
+ * \return string Retourne tag img
*/
function img_up($alt = "default", $selected=0)
{
global $conf,$langs;
if ($alt=="default") $alt=$langs->trans("Up");
- if ($selected) return '
';
- else return '
';
+ if ($selected) return '
';
+ else return '
';
}
/**
- \brief Affiche logo gauche
- \param alt Texte sur le alt de l'image
- \param selected Affiche version "selected" du logo
- \return string Retourne tag img
+ * \brief Affiche logo gauche
+ * \param alt Texte sur le alt de l'image
+ * \param selected Affiche version "selected" du logo
+ * \return string Retourne tag img
*/
function img_left($alt = "default", $selected=0)
{
global $conf,$langs;
if ($alt=="default") $alt=$langs->trans("Left");
- if ($selected) return '
';
- else return '
';
+ if ($selected) return '
';
+ else return '
';
}
/**
- \brief Affiche logo droite
- \param alt Texte sur le alt de l'image
- \param selected Affiche version "selected" du logo
- \return string Retourne tag img
+ * \brief Affiche logo droite
+ * \param alt Texte sur le alt de l'image
+ * \param selected Affiche version "selected" du logo
+ * \return string Retourne tag img
*/
function img_right($alt = "default", $selected=0)
{
global $conf,$langs;
if ($alt=="default") $alt=$langs->trans("Right");
- if ($selected) return '
';
- else return '
';
+ if ($selected) return '
';
+ else return '
';
}
/**
- \brief Affiche logo tick
- \param alt Texte sur le alt de l'image
- \return string Retourne tag img
+ * \brief Affiche logo tick
+ * \param alt Texte sur le alt de l'image
+ * \return string Retourne tag img
*/
function img_tick($alt = "default")
{
global $conf,$langs;
if ($alt=="default") $alt=$langs->trans("Active");
- return '
';
+ return '
';
}
/**
- \brief Affiche le logo tick si allow
- \param allow Authorise ou non
- \return string Retourne tag img
+ * \brief Affiche le logo tick si allow
+ * \param allow Authorise ou non
+ * \return string Retourne tag img
*/
function img_allow($allow,$alt='default')
{
@@ -1393,7 +1393,7 @@ function img_allow($allow,$alt='default')
if ($allow == 1)
{
- return '
';
+ return '
';
}
else
{
diff --git a/htdocs/livraison/pre.inc.php b/htdocs/livraison/pre.inc.php
index 6750f5e21a8..7bb80186502 100644
--- a/htdocs/livraison/pre.inc.php
+++ b/htdocs/livraison/pre.inc.php
@@ -15,17 +15,13 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Id$
- * $Source$
- *
*/
/**
\file htdocs/livraison/pre.inc.php
\ingroup livraison
\brief Fichier de gestion du menu gauche du module livraison
- \version $Revision$
+ \version $Id$
*/
require("../main.inc.php");
diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index 752fdd0fd95..6f85f1f54a4 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -907,7 +907,7 @@ function top_menu($head, $title='', $target='')
print $html->textwithtooltip('',$htmltext,2,1,$text);
// Link to print main content area
- if (empty($conf->global->MAIN_PRINT_DISABLELINK))
+ if (empty($conf->global->MAIN_PRINT_DISABLELINK) && empty($conf->browser->phone))
{
$text ='';
$text.='