From fa435de6a90066eff8b2bc18161da4e76c4837e2 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sat, 27 Aug 2011 18:35:40 +0000 Subject: [PATCH] allow to call a function instead of a static helptext --- etemplate/inc/class.etemplate.inc.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/etemplate/inc/class.etemplate.inc.php b/etemplate/inc/class.etemplate.inc.php index 9d96c541c6..90a6404e97 100644 --- a/etemplate/inc/class.etemplate.inc.php +++ b/etemplate/inc/class.etemplate.inc.php @@ -1177,7 +1177,11 @@ class etemplate extends boetemplate { $help = lang($help); } - if (($use_tooltip_for_help = strpos($help,'<') !== false && strip_tags($help) != $help)) // helptext is html => use a tooltip + if (substr($help,0,5) == 'call:') + { + $options .= ' onMouseOver="'.html::htmlspecialchars(substr($help,5)).'"'; + } + elseif (($use_tooltip_for_help = strpos($help,'<') !== false && strip_tags($help) != $help)) // helptext is html => use a tooltip { $options .= html::tooltip($help); }