Bug #22410 » 14050_cleaning_t3lib_tceforms_fe.patch
t3lib/class.t3lib_tceforms_fe.php (revision ) | ||
---|---|---|
<?php
|
||
/***************************************************************
|
||
* Copyright notice
|
||
*
|
||
* (c) 1999-2010 Kasper Sk?rh?j (kasperYYYY@typo3.com)
|
||
* All rights reserved
|
||
*
|
||
* This script is part of the TYPO3 project. The TYPO3 project is
|
||
* free software; you can redistribute it and/or modify
|
||
* it under the terms of the GNU General Public License as published by
|
||
* the Free Software Foundation; either version 2 of the License, or
|
||
* (at your option) any later version.
|
||
*
|
||
* The GNU General Public License can be found at
|
||
* http://www.gnu.org/copyleft/gpl.html.
|
||
* A copy is found in the textfile GPL.txt and important notices to the license
|
||
* from the author is found in LICENSE.txt distributed with these scripts.
|
||
*
|
||
*
|
||
* This script is distributed in the hope that it will be useful,
|
||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
* GNU General Public License for more details.
|
||
*
|
||
* This copyright notice MUST APPEAR in all copies of the script!
|
||
***************************************************************/
|
||
* Copyright notice
|
||
*
|
||
* (c) 1999-2010 Kasper Sk?rh?j (kasperYYYY@typo3.com)
|
||
* All rights reserved
|
||
*
|
||
* This script is part of the TYPO3 project. The TYPO3 project is
|
||
* free software; you can redistribute it and/or modify
|
||
* it under the terms of the GNU General Public License as published by
|
||
* the Free Software Foundation; either version 2 of the License, or
|
||
* (at your option) any later version.
|
||
*
|
||
* The GNU General Public License can be found at
|
||
* http://www.gnu.org/copyleft/gpl.html.
|
||
* A copy is found in the textfile GPL.txt and important notices to the license
|
||
* from the author is found in LICENSE.txt distributed with these scripts.
|
||
*
|
||
*
|
||
* This script is distributed in the hope that it will be useful,
|
||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
* GNU General Public License for more details.
|
||
*
|
||
* This copyright notice MUST APPEAR in all copies of the script!
|
||
***************************************************************/
|
||
/**
|
||
* [CLASS/FUNCTION INDEX of SCRIPT]
|
||
*
|
||
*
|
||
*
|
||
* 60: class t3lib_TCEforms_FE extends t3lib_TCEforms
|
||
* 68: public function wrapLabels($str)
|
||
* 68: public function wrapLabels($str)
|
||
* 78: public function printPalette(array $paletteArray)
|
||
* 78: public function printPalette(array $paletteArray)
|
||
* 102: public function setFancyDesign()
|
||
* 102: public function setFancyDesign()
|
||
* 131: public function loadJavascriptLib($lib)
|
||
* 131: public function loadJavascriptLib($lib)
|
||
* 146: public function addStyleSheet($key, $href, $title='', $relation='stylesheet')
|
||
* 146: public function addStyleSheet($key, $href, $title='', $relation='stylesheet')
|
||
*
|
||
* TOTAL FUNCTIONS: 5
|
||
* (This index is automatically created/updated by the extension "extdeveval")
|
||
... | ... | |
*/
|
||
/**
|
||
* Extension class for the rendering of TCEforms in the frontend
|
||
*
|
||
... | ... | |
public function printPalette(array $paletteArray) {
|
||
$out = '';
|
||
$bgColor = ' bgcolor="#D6DAD0"';
|
||
foreach($paletteArray as $content) {
|
||
foreach ($paletteArray as $content) {
|
||
$hRow[] = '<td' . $bgColor . '><font face="verdana" size="1"> </font></td><td nowrap="nowrap"' . $bgColor . '><font color="#666666" face="verdana" size="1">' . $content['NAME'] . '</font></td>';
|
||
$iRow[] = '<td valign="top">' .
|
||
'<img name="req_' . $content['TABLE'].'_' . $content['ID'] . '_' . $content['FIELD'] . '" src="clear.gif" width="10" height="10" alt="" />' .
|
||
'<img name="req_' . $content['TABLE'] . '_' . $content['ID'] . '_' . $content['FIELD'] . '" src="clear.gif" width="10" height="10" alt="" />' .
|
||
'<img name="cm_' . $content['TABLE'].'_' . $content['ID'] . '_' . $content['FIELD'] . '" src="clear.gif" width="7" height="10" alt="" />' .
|
||
'<img name="cm_' . $content['TABLE'] . '_' . $content['ID'] . '_' . $content['FIELD'] . '" src="clear.gif" width="7" height="10" alt="" />' .
|
||
'</td><td nowrap="nowrap" valign="top">' . $content['ITEM'] . $content['HELP_ICON'] . '</td>';
|
||
'</td><td nowrap="nowrap" valign="top">' . $content['ITEM'] . $content['HELP_ICON'] . '</td>';
|
||
}
|
||
$out = '<table border="0" cellpadding="0" cellspacing="0">
|
||
<tr><td><img src="clear.gif" width="' . intval($this->paletteMargin) . '" height="1" alt="" /></td>' . implode('', $hRow) . '</tr>
|
||
... | ... | |
</tr> ';
|
||
}
|
||
/**
|
||
/**
|
||
* Includes a javascript library that exists in the core /typo3/ directory. The
|
||
* backpath is automatically applied.
|
||
* This method adds the library to $GLOBALS['TSFE']->additionalHeaderData[$lib].
|
||
... | ... | |
* @return string $relation: value for the rel attribute of the link element
|
||
* @return void
|
||
*/
|
||
public function addStyleSheet($key, $href, $title='', $relation='stylesheet') {
|
||
public function addStyleSheet($key, $href, $title = '', $relation = 'stylesheet') {
|
||
/** @var $pageRenderer t3lib_PageRenderer */
|
||
$pageRenderer = $GLOBALS['TSFE']->getPageRenderer();
|
||
$pageRenderer->addCssFile($this->prependBackPath($href), $relation, 'screen', $title);
|
||
}
|
||
}
|
||
/**
|
||
* Initializes an anonymous template container.
|