[BUGFIX] Disable the TCA Tree if $PA['fieldConf']['config']['readOnly'] is true.
authorMarco Huber <mail@marco-huber.de>
Mon, 11 Apr 2011 13:15:19 +0000 (15:15 +0200)
committerOliver Hader <oliver@typo3.org>
Tue, 12 Apr 2011 11:54:22 +0000 (13:54 +0200)
Disable the TCA Tree if $PA['fieldConf']['config']['readOnly'] is true.
This happens for example in translations of records if
$TCA['my_table']['columns']['my_column']['l10n_display'] = 'defaultAsReadonly'.

Change-Id: I18195bbc3fc6369d56669a5fd5c81103140e7a6c
Resolves: #25888
Releases: 4.6, 4.5
Reviewed-on: http://review.typo3.org/1548
Reviewed-by: Marco Huber
Tested-by: Marco Huber
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader
t3lib/tceforms/class.t3lib_tceforms_tree.php

index c836a7b..4724f61 100644 (file)
@@ -185,7 +185,8 @@ class t3lib_TCEforms_Tree {
                $PA['fieldConf']['config']['exclusiveKeys']
                                ? $PA['fieldConf']['config']['exclusiveKeys'] : '') . '",
                                ucId: "' . md5($table . '|' . $field) . '",
-                               selModel: TYPO3.Components.Tree.EmptySelectionModel
+                               selModel: TYPO3.Components.Tree.EmptySelectionModel,
+                               disabled: ' . ($PA['fieldConf']['config']['readOnly'] ? 'true' : 'false') . '
                        });' . LF .
                        ($autoSizeMax
                                ? 'tree' . $id . '.bodyStyle = "max-height: ' . $autoSizeMax . 'px;min-height: ' . $height . 'px;";'