Project

General

Profile

Bug #19784 » 10088_v2.diff

Administrator Admin, 2009-01-10 17:53

View differences:

t3lib/class.t3lib_tceforms.php (working copy)
if (is_array($value)) { // The value of each entry must be an array.
// ********************
// Making the row:
// Making the row:
// ********************
// Title of field:
$theTitle = htmlspecialchars(t3lib_div::fixed_lgd_cs($this->sL($value['tx_templavoila']['title']),30));
$title = isset($value['title']) ? $value['title'] : isset($value['tx_templavoila']['title']) ? $value['tx_templavoila']['title'] : '['.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.no_title', 1).']';
$theTitle = htmlspecialchars(t3lib_div::fixed_lgd_cs($this->sL($title), 30));
// If it's a "section" or "container":
if ($value['type']=='array') {
......
// Kasper's comment (kept for history): Maybe there is a better way to do this than store the HTML for the new element in rawurlencoded format - maybe it even breaks with certain charsets? But for now this works...
$this->additionalJS_post = $additionalJS_post_saved;
$this->additionalJS_submit = $additionalJS_submit_saved;
$newElementsLinks[]= '<a href="#" onclick="'.htmlspecialchars($onClickInsert).'"><img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/new_el.gif','width="11" height="12"').' alt="New" title="New" align="absmiddle" />'.htmlspecialchars(t3lib_div::fixed_lgd_cs($this->sL($nCfg['tx_templavoila']['title']),30)).'</a>';
// Group title is XPath title or templavoila/title
$elementTitle = isset($nCfg['title']) ? $nCfg['title'] : isset($nCfg['tx_templavoila']['title']) ? $nCfg['tx_templavoila']['title'] : '['.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.no_title', 1).']';
$newElementsLinks[]= '<a href="#" onclick="' . htmlspecialchars($onClickInsert) . '">
<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/new_el.gif', 'width="11" height="12"') . ' alt="New" title="New" align="absmiddle" />' .
htmlspecialchars(t3lib_div::fixed_lgd_cs($this->sL($elementTitle), 30)) .
'</a>';
}
// Reverting internal variables we don't want to change:
(2-2/2)