Fixed bug #16028: Enable 'clear input field' functionality by default (Thanks to...
authorJeff Segars <jsegars@alumni.rice.edu>
Fri, 14 Jan 2011 20:41:52 +0000 (20:41 +0000)
committerJeff Segars <jsegars@alumni.rice.edu>
Fri, 14 Jan 2011 20:41:52 +0000 (20:41 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@10079 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_tceforms.php
t3lib/stddb/tbl_be.php
t3lib/stddb/tbl_pages.php
typo3/sysext/cms/tbl_cms.php
typo3/sysext/cms/tbl_tt_content.php

index 44ce341..a83f7f8 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 2011-01-14  Jeff Segars  <jeff@webempoweredchurch.org>
 
        * Fixed bug #17035: Positioning and JS behaviour of the icon to clear input fields are suboptimal (Thanks to Jo Hasenau)
+       * Fixed bug #16028: Enable "clear input field" functionality by default (Thanks to Jo Hasenau)
 
 2011-01-14  Francois Suter  <francois.suter@typo3.org>
 
index 01b82ea..e2b3601 100644 (file)
@@ -1054,6 +1054,13 @@ class t3lib_TCEforms {
                $cssClasses = array($classAndStyleAttributes['class']);
                $cssStyle = $classAndStyleAttributes['style'];
 
+               if (!isset($config['checkbox'])) {
+                       $config['checkbox'] = '0';
+                       $checkboxIsset = FALSE;
+               } else {
+                       $checkboxIsset = TRUE;
+               }
+
                if (in_array('date', $evalList) || in_array('datetime', $evalList)) {
                        if (in_array('datetime', $evalList)) {
                                $class = 'datetime';
@@ -1079,27 +1086,24 @@ class t3lib_TCEforms {
                } elseif (in_array('timesec', $evalList)) {
                        $inputId = uniqid('tceforms-timesecfield-');
                        $cssClasses[] = 'tceforms-textfield tceforms-timesecfield';
-
                } elseif (in_array('year', $evalList)) {
                        $inputId = uniqid('tceforms-yearfield-');
                        $cssClasses[] = 'tceforms-textfield tceforms-yearfield';
-
                } elseif (in_array('time', $evalList)) {
                        $inputId = uniqid('tceforms-timefield-');
                        $cssClasses[] = 'tceforms-textfield tceforms-timefield';
-
                } elseif (in_array('int', $evalList)) {
                        $inputId = uniqid('tceforms-intfield-');
                        $cssClasses[] = 'tceforms-textfield tceforms-intfield';
-
                } elseif (in_array('double2', $evalList)) {
                        $inputId = uniqid('tceforms-double2field-');
                        $cssClasses[] = 'tceforms-textfield tceforms-double2field';
-
                } else {
                        $inputId = uniqid('tceforms-textfield-');
                        $cssClasses[] = 'tceforms-textfield';
-
+                       if ($checkboxIsset === FALSE) {
+                               $config['checkbox'] = '';
+                       }
                }
                if (isset($config['wizards']['link'])) {
                        $inputId = uniqid('tceforms-linkfield-');
index 7282a18..0411791 100644 (file)
@@ -114,7 +114,6 @@ $TCA['be_users'] = array(
                                'size' => '20',
                                'eval' => 'trim',
                                'max' => '50',
-                               'checkbox' => '',
                                'softref' => 'substitute'
                        )
                ),
@@ -263,7 +262,6 @@ $TCA['be_users'] = array(
                                'max' => '20',
                                'eval' => 'date',
                                'default' => '0',
-                               'checkbox' => '0'
                        )
                ),
                'endtime' => array(
@@ -273,7 +271,6 @@ $TCA['be_users'] = array(
                                'size' => '8',
                                'max' => '20',
                                'eval' => 'date',
-                               'checkbox' => '0',
                                'default' => '0',
                                'range' => array(
                                        'upper' => mktime(0, 0, 0, 12, 31, 2020),
@@ -608,7 +605,6 @@ $TCA['be_groups'] = array(
                                'size' => '20',
                                'eval' => 'trim',
                                'max' => '50',
-                               'checkbox' => '',
                                'softref' => 'substitute'
                        )
                ),
@@ -835,7 +831,6 @@ $TCA['sys_news'] = array(
                                'size' => '8',
                                'max' => '20',
                                'eval' => 'date',
-                               'checkbox' => '0',
                                'default' => '0'
                        )
                ),
@@ -847,7 +842,6 @@ $TCA['sys_news'] = array(
                                'size' => '8',
                                'max' => '20',
                                'eval' => 'date',
-                               'checkbox' => '0',
                                'default' => '0'
                        )
                ),
index 34851ad..a65724c 100644 (file)
@@ -82,7 +82,6 @@ $TCA['pages'] = array(
                                'size' => '50',
                                'max' => '255',
                                'eval' => 'trim,required',
-                               'checkbox' => '',
                        ),
                ),
                'TSconfig' => array(
@@ -178,7 +177,6 @@ $TCA['pages'] = array(
                                'size' => '13',
                                'max' => '20',
                                'eval' => 'date',
-                               'checkbox' => '0',
                                'default' => '0',
                        ),
                ),
@@ -190,7 +188,6 @@ $TCA['pages'] = array(
                                'size' => '13',
                                'max' => '20',
                                'eval' => 'date',
-                               'checkbox' => '0',
                                'default' => '0',
                                'range' => array(
                                        'upper' => mktime(0, 0, 0, 12, 31, 2020),
@@ -290,7 +287,6 @@ $TCA['pages'] = array(
                                'type' => 'input',
                                'size' => '50',
                                'max' => '255',
-                               'checkbox' => '',
                                'eval' => 'trim',
                        ),
                ),
@@ -314,7 +310,6 @@ $TCA['pages'] = array(
                                'size' => '50',
                                'max' => '255',
                                'eval' => '',
-                               'checkbox' => '',
                        ),
                ),
                'target' => array(
@@ -325,7 +320,6 @@ $TCA['pages'] = array(
                                'size' => '50',
                                'max' => '80',
                                'eval' => 'trim',
-                               'checkbox' => '',
                        ),
                ),
                'alias' => array(
@@ -337,7 +331,6 @@ $TCA['pages'] = array(
                                'max' => '32',
                                'eval' => 'nospace,alphanum_x,lower,unique',
                                'softref' => 'notify',
-                               'checkbox' => '',
                        ),
                ),
                'url' => array(
@@ -348,7 +341,6 @@ $TCA['pages'] = array(
                                'max' => '255',
                                'eval' => 'trim,required',
                                'softref' => 'url',
-                               'checkbox' => '',
                        ),
                ),
                'urltype' => array(
@@ -388,7 +380,6 @@ $TCA['pages'] = array(
                                'size' => '13',
                                'max' => '20',
                                'eval' => 'datetime',
-                               'checkbox' => '0',
                                'default' => '0',
                        ),
                ),
@@ -400,7 +391,6 @@ $TCA['pages'] = array(
                                'size' => '13',
                                'max' => '20',
                                'eval' => 'date',
-                               'checkbox' => '0',
                                'default' => '0',
                        ),
                ),
@@ -594,7 +584,6 @@ $TCA['pages'] = array(
                                'size' => '23',
                                'eval' => 'trim',
                                'max' => '80',
-                               'checkbox' => '',
                        ),
                ),
                'author_email' => array(
@@ -606,7 +595,6 @@ $TCA['pages'] = array(
                                'eval' => 'trim',
                                'max' => '80',
                                'softref' => 'email[subst]',
-                               'checkbox' => '',
                        ),
                ),
                'media' => array(
index 8cd1471..c7573b4 100755 (executable)
@@ -85,7 +85,6 @@ $TCA['fe_users'] = array(
                                'size' => '20',
                                'eval' => 'trim',
                                'max' => '50',
-                               'checkbox' => '',
                                'softref' => 'substitute'
                        )
                ),
@@ -259,7 +258,6 @@ $TCA['fe_users'] = array(
                                'max' => '20',
                                'eval' => 'date',
                                'default' => '0',
-                               'checkbox' => '0'
                        )
                ),
                'endtime' => array(
@@ -270,7 +268,6 @@ $TCA['fe_users'] = array(
                                'size' => '8',
                                'max' => '20',
                                'eval' => 'date',
-                               'checkbox' => '0',
                                'default' => '0',
                                'range' => array(
                                        'upper' => mktime(0,0,0,12,31,2020),
@@ -379,7 +376,6 @@ $TCA['fe_groups'] = array(
                                'size' => '20',
                                'eval' => 'trim',
                                'max' => '50',
-                               'checkbox' => ''
                        )
                ),
                'description' => array(
@@ -449,7 +445,6 @@ $TCA['sys_domain'] = array(
                                'type' => 'input',
                                'size' => '35',
                                'max' => '120',
-                               'checkbox' => '',
                                'default' => '',
                                'eval' => 'trim',
                                'softref' => 'substitute'
@@ -538,7 +533,6 @@ $TCA['pages_language_overlay'] = array(
                                'size' => '8',
                                'max' => '20',
                                'eval' => 'date',
-                               'checkbox' => '0',
                                'default' => '0'
                        )
                ),
@@ -550,7 +544,6 @@ $TCA['pages_language_overlay'] = array(
                                'size' => '8',
                                'max' => '20',
                                'eval' => 'date',
-                               'checkbox' => '0',
                                'default' => '0',
                                'range' => array(
                                        'upper' => mktime(0,0,0,12,31,2020),
@@ -566,7 +559,6 @@ $TCA['pages_language_overlay'] = array(
                                'size' => '50',
                                'max' => '255',
                                'eval' => 'trim,required',
-                               'checkbox' => '',
                        )
                ),
                'subtitle' => array(
@@ -578,7 +570,6 @@ $TCA['pages_language_overlay'] = array(
                                'size' => '50',
                                'max' => '255',
                                'eval' => 'trim',
-                               'checkbox' => '',
                        )
                ),
                'nav_title' => array(
@@ -590,7 +581,6 @@ $TCA['pages_language_overlay'] = array(
                                'size' => '50',
                                'max' => '255',
                                'eval' => 'trim',
-                               'checkbox' => '',
                        )
                ),
                'keywords' => array(
@@ -628,7 +618,6 @@ $TCA['pages_language_overlay'] = array(
                                'size' => '23',
                                'eval' => 'trim',
                                'max' => '80',
-                               'checkbox' => '',
                        )
                ),
                'author_email' => array(
@@ -640,7 +629,6 @@ $TCA['pages_language_overlay'] = array(
                                'eval' => 'trim',
                                'max' => '80',
                                'softref' => 'email[subst]',
-                               'checkbox' => '',
                        )
                ),
                'media' => array(
@@ -667,7 +655,6 @@ $TCA['pages_language_overlay'] = array(
                                'max' => '255',
                                'eval' => 'trim',
                                'softref' => 'url',
-                               'checkbox' => '',
                        )
                ),
                'urltype' => array(
@@ -930,7 +917,6 @@ $TCA['sys_template'] = array(
                                'size' => '8',
                                'max' => '20',
                                'eval' => 'date',
-                               'checkbox' => '0',
                                'default' => '0'
                        )
                ),
@@ -942,7 +928,6 @@ $TCA['sys_template'] = array(
                                'size' => '8',
                                'max' => '20',
                                'eval' => 'date',
-                               'checkbox' => '0',
                                'default' => '0',
                                'range' => array(
                                        'upper' => mktime(0,0,0,12,31,2020),
index fa096d9..3ce6080 100755 (executable)
@@ -186,7 +186,6 @@ $TCA['tt_content'] = array(
                                'size' => '13',
                                'max' => '20',
                                'eval' => 'date',
-                               'checkbox' => '0',
                                'default' => '0',
                        ),
                ),
@@ -198,7 +197,6 @@ $TCA['tt_content'] = array(
                                'size' => '13',
                                'max' => '20',
                                'eval' => 'date',
-                               'checkbox' => '0',
                                'default' => '0',
                                'range' => array(
                                        'upper' => mktime(0,0,0,12,31,2020),
@@ -327,7 +325,6 @@ $TCA['tt_content'] = array(
                                'size' => '13',
                                'max' => '20',
                                'eval' => 'date',
-                               'checkbox' => '0',
                                'default' => '0',
                        ),
                ),
@@ -339,7 +336,6 @@ $TCA['tt_content'] = array(
                                'type' => 'input',
                                'size' => '50',
                                'max' => '256',
-                               'checkbox' => '',
                        ),
                ),
                'header_position' => array(
@@ -375,7 +371,6 @@ $TCA['tt_content'] = array(
                                'type' => 'input',
                                'size' => '50',
                                'max' => '256',
-                               'checkbox' => '',
                                'eval' => 'trim',
                                'wizards' => array(
                                        '_PADDING' => 2,
@@ -436,7 +431,6 @@ $TCA['tt_content'] = array(
                                'size' => '50',
                                'max' => '256',
                                'softref' => 'email[subst]',
-                               'checkbox' => '',
                        ),
                ),
                'bodytext' => array(
@@ -702,7 +696,6 @@ $TCA['tt_content'] = array(
                                'size' => '4',
                                'max' => '4',
                                'eval' => 'int',
-                               'checkbox' => '0',
                                'range' => array(
                                        'upper' => '999',
                                        'lower' => '25',
@@ -718,7 +711,6 @@ $TCA['tt_content'] = array(
                                'size' => '4',
                                'max' => '4',
                                'eval' => 'int',
-                               'checkbox' => '0',
                                'range' => array(
                                        'upper' => '700',
                                        'lower' => '25',
@@ -822,7 +814,6 @@ $TCA['tt_content'] = array(
                                'type' => 'input',
                                'size' => '50',
                                'max' => '51200',
-                               'checkbox' => '',
                                'eval' => 'trim',
                                'wizards' => array(
                                        '_PADDING' => 2,
@@ -1361,7 +1352,6 @@ $TCA['tt_content'] = array(
                                'size' => '3',
                                'max' => '3',
                                'eval' => 'int',
-                               'checkbox' => '0',
                                'range' => array(
                                        'upper' => '20',
                                        'lower' => '0',
@@ -1377,7 +1367,6 @@ $TCA['tt_content'] = array(
                                'size' => '3',
                                'max' => '3',
                                'eval' => 'int',
-                               'checkbox' => '0',
                                'range' => array(
                                        'upper' => '200',
                                        'lower' => '0',
@@ -1393,7 +1382,6 @@ $TCA['tt_content'] = array(
                                'size' => '3',
                                'max' => '3',
                                'eval' => 'int',
-                               'checkbox' => '0',
                                'range' => array(
                                        'upper' => '200',
                                        'lower' => '0',
@@ -1465,7 +1453,6 @@ $TCA['tt_content'] = array(
                                'size' => '5',
                                'max' => '5',
                                'eval' => 'int',
-                               'checkbox' => '0',
                                'range' => array(
                                        'lower' => '0',
                                ),
@@ -1480,7 +1467,6 @@ $TCA['tt_content'] = array(
                                'size' => '5',
                                'max' => '5',
                                'eval' => 'int',
-                               'checkbox' => '0',
                                'range' => array(
                                        'lower' => '0',
                                ),