- 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
This commit is contained in:
Ralf Becker 2005-06-01 08:09:33 +00:00
parent c555299592
commit 00408f24cb

View File

@ -706,9 +706,16 @@
$cell_options = $this->get_array($content,substr($cell_options,1)); $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); $label = $this->expand_name($cell['label'],$show_c,$show_row,$content['.c'],$content['.row'],$content);
$help = $cell['help']; $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] == '@') if ($help[0] == '@')
{ {
$no_lang_on_help = true;
$help = $this->get_array($content,substr($help,1)); $help = $this->get_array($content,substr($help,1));
} }
$blur = $cell['blur'][0] == '@' ? $this->get_array($content,substr($cell['blur'],1)) : $blur = $cell['blur'][0] == '@' ? $this->get_array($content,substr($cell['blur'],1)) :
@ -727,7 +734,7 @@
} }
if ($help) if ($help)
{ {
if ((int)$cell['no_lang'] < 2) if ((int)$cell['no_lang'] < 2 && !$no_lang_on_help)
{ {
$help = lang($help); $help = lang($help);
} }
@ -1325,10 +1332,12 @@
} }
if ($extra_link) if ($extra_link)
{ {
$options = " onmouseover=\"self.status='".addslashes(lang($help))."'; return true;\""; $options = $help ? ' onmouseover="self.status=\''.addslashes($this->html->htmlspecialchars($help)).'\'; return true;"' .
$options .= " onmouseout=\"self.status=''; return true;\""; ' onmouseout="self.status=\'\'; return true;"' : '';
if ($extra_link_target) $options .= ' target="'.$extra_link_target.'"'; 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 // if necessary show validation-error behind field