Index: t3lib/class.t3lib_tceforms.php
===================================================================
--- t3lib/class.t3lib_tceforms.php (révision 8642)
+++ t3lib/class.t3lib_tceforms.php (copie de travail)
@@ -2541,7 +2541,10 @@
$PA['_valLang'] = $langChildren && !$langDisabled ? $editData['meta']['currentLangId'] : 'DEF'; // Default language, other options are "lUK" or whatever country code (independant of system!!!)
$PA['_lang'] = $lang;
$PA['_cshFile'] = ((isset($dataStruct['ROOT']['TCEforms']) && isset($dataStruct['ROOT']['TCEforms']['cshFile'])) ? $dataStruct['ROOT']['TCEforms']['cshFile'] : '');
-
+ if (is_array($dataStructArray['sheets'])) {
+ $tabIdentString = $GLOBALS['TBE_TEMPLATE']->getDynTabMenuId('TCEFORMS:flexform:' . $PA['itemFormElName'] . $PA['_lang']);
+ $this->pushToDynNestedStack('tab', $tabIdentString . '-' . (count($tabParts)+1));
+ }
// Render flexform:
$tRows = $this->getSingleField_typeFlex_draw(
$dataStruct['ROOT']['el'],
@@ -2557,8 +2560,10 @@
# $item = '
'.$item.'
';
//visibility:hidden;
+ if (is_array($dataStructArray['sheets'])) {
+ $this->popFromDynNestedStack('tab', $tabIdentString . '-' . (count($tabParts)+1));
+ }
} else $sheetContent='Data Structure ERROR: No ROOT element found for sheet "'.$sheet.'".';
-
// Add to tab:
$tabParts[] = array(
'label' => ($dataStruct['ROOT']['TCEforms']['sheetTitle'] ? $this->sL($dataStruct['ROOT']['TCEforms']['sheetTitle']) : $sheet),
@@ -2567,7 +2572,6 @@
'content' => $sheetContent
);
}
-
if (is_array($dataStructArray['sheets'])) {
$dividersToTabsBehaviour = (isset($GLOBALS['TCA'][$table]['ctrl']['dividers2tabs']) ? $GLOBALS['TCA'][$table]['ctrl']['dividers2tabs'] : 1);
$item.= $this->getDynTabMenu($tabParts, 'TCEFORMS:flexform:'.$PA['itemFormElName'].$PA['_lang'], $dividersToTabsBehaviour);
@@ -2647,7 +2651,6 @@
$output = '';
$mayRestructureFlexforms = $GLOBALS['BE_USER']->checkLanguageAccess(0);
-
// Data Structure array must be ... and array of course...
if (is_array($dataStruct)) {
foreach($dataStruct as $key => $value) { // Traversing fields in structure:
@@ -2661,7 +2664,6 @@
// If it's a "section" or "container":
if ($value['type']=='array') {
-
// Creating IDs for form fields:
// It's important that the IDs "cascade" - otherwise we can't dynamically expand the flex form because this relies on simple string substitution of the first parts of the id values.
$thisId = t3lib_div::shortMd5(uniqid('id',true)); // This is a suffix used for forms on this level