[BUGFIX] Flexform sheet description should be editable via TSConfig
authorKai Vogel <kai.vogel@speedprogs.de>
Wed, 11 May 2011 18:56:49 +0000 (20:56 +0200)
committerAndreas Wolf <andreas.wolf@ikt-werk.de>
Mon, 6 Jun 2011 13:35:16 +0000 (15:35 +0200)
Flexform sheet description, short description and language meta settings are now editable via TSConfig.

Change-Id: Ib60c96eb74494444aff14a80d677e52895102f84
Resolves: #26771
Reviewed-on: http://review.typo3.org/2086
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
Reviewed-by: Andreas Wolf
Tested-by: Andreas Wolf
t3lib/tceforms/class.t3lib_tceforms_flexforms.php

index 5cc653f..98a4b1d 100644 (file)
@@ -93,7 +93,6 @@ class t3lib_TCEforms_Flexforms extends t3lib_TCEforms {
                if (!empty($TSconfig[$tableField][$flexformIdentifier . '.'])) {
                        $sheetConf = t3lib_div::removeDotsFromTS($TSconfig[$tableField][$flexformIdentifier . '.']);
                }
-               ;
 
                        // Get non-exclude-fields from group access lists
                $nonExcludeFields = $this->getFlexFormNonExcludeFields($table, $tableField, $flexformIdentifier);
@@ -101,6 +100,14 @@ class t3lib_TCEforms_Flexforms extends t3lib_TCEforms {
                        // Load complete DS, including external file references
                $dataStructure = t3lib_div::resolveAllSheetsInDS($dataStructure);
 
+                       // Modify language handling in meta configuration
+               if (isset($sheetConf['langDisable'])) {
+                       $metaConf['langDisable'] = $sheetConf['langDisable'];
+               }
+               if (isset($sheetConf['langChildren'])) {
+                       $metaConf['langChildren'] = $sheetConf['langChildren'];
+               }
+
                        // Modify flexform sheets
                foreach ($dataStructure['sheets'] as $sheetName => $sheet) {
                        if (empty($sheet['ROOT']['el']) || !is_array($sheet['ROOT']['el'])) {
@@ -114,11 +121,21 @@ class t3lib_TCEforms_Flexforms extends t3lib_TCEforms {
                        }
 
                                // Rename sheet (tab)
-                       if (!empty($sheetConf[$sheetName]['title'])) {
-                               $dataStructure['sheets'][$sheetName]['ROOT']['TCEforms']['sheetTitle'] = $sheetConf[$sheetName]['title'];
+                       if (!empty($sheetConf[$sheetName]['sheetTitle'])) {
+                               $dataStructure['sheets'][$sheetName]['ROOT']['TCEforms']['sheetTitle'] = $sheetConf[$sheetName]['sheetTitle'];
+                       }
+
+                               // Set sheet description (tab)
+                       if (!empty($sheetConf[$sheetName]['sheetDescription'])) {
+                               $dataStructure['sheets'][$sheetName]['ROOT']['TCEforms']['sheetDescription'] = $sheetConf[$sheetName]['sheetDescription'];
+                       }
+
+                               // Set sheet short description (tab)
+                       if (!empty($sheetConf[$sheetName]['sheetShortDescr'])) {
+                               $dataStructure['sheets'][$sheetName]['ROOT']['TCEforms']['sheetShortDescr'] = $sheetConf[$sheetName]['sheetShortDescr'];
                        }
 
-                               // Modify all configured fields in sheet
+                               // Modify all configured fields in sheet (tab)
                        $dataStructure['sheets'][$sheetName]['ROOT']['el'] = $this->modifySingleFlexFormSheet(
                                $sheet['ROOT']['el'],
                                $table,