[BUGFIX] No placeholder attribute in backend forms 65/25365/4
authorOliver Hader <oliver@typo3.org>
Wed, 13 Nov 2013 09:44:41 +0000 (10:44 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Sat, 18 Jan 2014 13:15:54 +0000 (14:15 +0100)
The disposal of the placeholder feature in backend forms needs
to be enabled using the mode setting "useOrOverridePlaceholder"
in TCA. However, the implementation for checking this needs to
be inverted, since it returns an empty string if it's enabled,
but should be the opposite way instead.

Fixes: #53594
Releases: 6.2, 6.1, 6.0
Change-Id: I3d3fe5ac76c05f4601860c79d7f514bffea13963
Reviewed-on: https://review.typo3.org/25365
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
typo3/sysext/backend/Classes/Form/FormEngine.php

index c5a5e59..aa3b8ef 100644 (file)
@@ -6517,7 +6517,7 @@ TBE_EDITOR.customEvalFunctions[\'' . $evalData . '\'] = function(value) {
         * @return string
         */
        protected function getPlaceholderAttribute($table, $field, array $config, array $row) {
-               if (isset($config['mode']) && $config['mode'] === 'useOrOverridePlaceholder') {
+               if (!isset($config['mode']) || $config['mode'] !== 'useOrOverridePlaceholder') {
                        return '';
                }