From 00408f24cbac65b96419fca9c82a63c819c0e4f1 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 1 Jun 2005 08:09:33 +0000 Subject: [PATCH] - applied fix from Joao Martins: extra_link_target without help - fixed a double translation on the help text of the extra_link - running the help-text through expand_name now to allow eg. row specific helptexts in nextmatch rows --- etemplate/inc/class.uietemplate.inc.php | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/etemplate/inc/class.uietemplate.inc.php b/etemplate/inc/class.uietemplate.inc.php index da52f6e3b9..bb5505c86b 100644 --- a/etemplate/inc/class.uietemplate.inc.php +++ b/etemplate/inc/class.uietemplate.inc.php @@ -706,9 +706,16 @@ $cell_options = $this->get_array($content,substr($cell_options,1)); } $label = $this->expand_name($cell['label'],$show_c,$show_row,$content['.c'],$content['.row'],$content); + $help = $cell['help']; + if (strchr($help,'$')) + { + $no_lang_on_help = true; + $help = $this->expand_name($help,$show_c,$show_row,$content['.c'],$content['.row'],$content); + } if ($help[0] == '@') { + $no_lang_on_help = true; $help = $this->get_array($content,substr($help,1)); } $blur = $cell['blur'][0] == '@' ? $this->get_array($content,substr($cell['blur'],1)) : @@ -727,7 +734,7 @@ } if ($help) { - if ((int)$cell['no_lang'] < 2) + if ((int)$cell['no_lang'] < 2 && !$no_lang_on_help) { $help = lang($help); } @@ -1325,10 +1332,12 @@ } if ($extra_link) { - $options = " onmouseover=\"self.status='".addslashes(lang($help))."'; return true;\""; - $options .= " onmouseout=\"self.status=''; return true;\""; + $options = $help ? ' onmouseover="self.status=\''.addslashes($this->html->htmlspecialchars($help)).'\'; return true;"' . + ' onmouseout="self.status=\'\'; return true;"' : ''; + if ($extra_link_target) $options .= ' target="'.$extra_link_target.'"'; - return $this->html->a_href($html,$extra_link,'',$help != '' ? $options : ''); + + return $this->html->a_href($html,$extra_link,'',$options); } } // if necessary show validation-error behind field