Project

General

Profile

Bug #18281 » 0007634.patch

Administrator Admin, 2008-02-23 15:19

View differences:

t3lib/class.t3lib_tceforms.php (Arbeitskopie)
var $localizationMode=''; // If true, the forms are rendering only localization relevant fields of the records.
var $fieldOrder=''; // Overrule the field order set in TCA[types][showitem], eg for tt_content this value, 'bodytext,image', would make first the 'bodytext' field, then the 'image' field (if set for display)... and then the rest in the old order.
var $doPrintPalette=1; // If set to false, palettes will NEVER be rendered.
var $dividers2tabs=0; // Will be set to TCA[ctrl][dividers2tabs]
/**
* Set to initialized clipboard object; Then the element browser will offer a link to paste in records from clipboard.
......
// Load the full TCA for the table.
t3lib_div::loadTCA($table);
// Loads the dividers2tabs from the $TCA
$this->dividers2tabs = $TCA[$table]['ctrl']['dividers2tabs'];
// Get dividers2tabs setting from TCA of the current table:
$dividers2tabs =& $TCA[$table]['ctrl']['dividers2tabs'];
// Load the description content for the table.
if ($this->edit_showFieldHelp || $this->doLoadTableDescr($table)) {
......
// If TCEforms will render a tab menu in the next step, push the name to the tab stack:
$tabIdentString = '';
$tabIdentStringMD5 = '';
if (strstr($itemList, '--div--') !== false && $this->enableTabMenu && $this->dividers2tabs) {
if (strstr($itemList, '--div--') !== false && $this->enableTabMenu && $dividers2tabs) {
$tabIdentString = 'TCEforms:'.$table.':'.$row['uid'];
$tabIdentStringMD5 = $GLOBALS['TBE_TEMPLATE']->getDynTabMenuId($tabIdentString);
// Remember that were currently working on the general tab:
......
if ($cc>0) {
$out_array[$out_sheet][$out_pointer].=$this->getDivider();
if ($this->enableTabMenu && $this->dividers2tabs) {
if ($this->enableTabMenu && $dividers2tabs) {
$this->wrapBorder($out_array[$out_sheet],$out_pointer);
// Remove last tab entry from the dynNestedStack:
$out_sheet++;
......
// Unset the current level of tab menus:
$this->popFromDynNestedStack('tab', $tabIdentStringMD5.'-'.($out_sheet+1));
$output = $this->getDynTabMenu($parts, $tabIdentString);
$output = $this->getDynTabMenu($parts, $tabIdentString, $table);
} else {
// If there is only one tab/part there is no need to wrap it into the dynTab code
......
}
if (is_array($dataStructArray['sheets'])) {
$item.= $this->getDynTabMenu($tabParts,'TCEFORMS:flexform:'.$PA['itemFormElName'].$PA['_lang']);
$item.= $this->getDynTabMenu($tabParts, 'TCEFORMS:flexform:'.$PA['itemFormElName'].$PA['_lang'], $table);
} else {
$item.= $sheetContent;
}
......
*
* @param array Parts for the tab menu, fed to template::getDynTabMenu()
* @param string ID string for the tab menu
* @param string Table to get the tab menu for
* @return string HTML for the menu
*/
function getDynTabMenu($parts, $idString) {
if (is_object($GLOBALS['TBE_TEMPLATE'])) {
return $GLOBALS['TBE_TEMPLATE']->getDynTabMenu($parts, $idString, 0, FALSE, 50, 1, FALSE, 1, $this->dividers2tabs);
function getDynTabMenu($parts, $idString, $table) {
if (is_object($GLOBALS['TBE_TEMPLATE'])) {
return $GLOBALS['TBE_TEMPLATE']->getDynTabMenu($parts, $idString, 0, FALSE, 50, 1, FALSE, 1, $GLOBALS[$table]['ctrl']['dividers2tabs']);
} else {
$output = '';
foreach($parts as $singlePad) {
(2-2/2)