Project

General

Profile

Bug #32422 » class.t3lib_tceforms.php.patch

Manuel Stofer, 2012-01-31 17:37

View differences:

class.t3lib_tceforms.php 2012-01-31 17:29:36.000000000 +0100
$replace = 'replace(/' . $idTagPrefix . '-/g,"' . $idTagPrefix . '-"+' . $var . '+"-")';
$onClickInsert = 'var ' . $var . ' = "' . 'idx"+(new Date()).getTime();';
// Do not replace $isTagPrefix in setActionStatus() because it needs section id!
$onClickInsert .= 'new Insertion.Bottom($("' . $idTagPrefix . '"), unescape(decodeURIComponent("' . rawurlencode($newElementTemplate) . '")).' . $replace . '); setActionStatus("' . $idTagPrefix . '");';
$onClickInsert .= 'new Insertion.Bottom($("' . $idTagPrefix . '"), ' . json_encode($newElementTemplate) . '.' . $replace . '); setActionStatus("' . $idTagPrefix . '");';
$onClickInsert .= 'eval(unescape("' . rawurlencode(implode(';', $this->additionalJS_post)) . '").' . $replace . ');';
$onClickInsert .= 'TBE_EDITOR.addActionChecks("submit", unescape("' . rawurlencode(implode(';', $this->additionalJS_submit)) . '").' . $replace . ');';
$onClickInsert .= 'return false;';
(2-2/3)