[TASK] Change checkboxes in sys_redirect 58/56758/7
authorIngo Nolden <dev@nolden.org>
Fri, 20 Apr 2018 15:33:02 +0000 (17:33 +0200)
committerFrank Naegler <frank.naegler@typo3.org>
Thu, 26 Apr 2018 14:52:54 +0000 (16:52 +0200)
Some checkboxes are changed to new rendertype checkboxToggle.
One checkbox label (hitcountState) is added.
This patch requires patch #56736 and #56745

Resolves: #84815
Related: #84793
Releases: master
Change-Id: Ic9d182bc9a4267b1107ca5c67a4176df01686240
Reviewed-on: https://review.typo3.org/56758
Reviewed-by: Alexander Opitz <opitz.alexander@googlemail.com>
Tested-by: Alexander Opitz <opitz.alexander@googlemail.com>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
typo3/sysext/redirects/Configuration/TCA/sys_redirect.php
typo3/sysext/redirects/Resources/Private/Language/locallang_db.xlf

index eb6a16d..feeefd2 100644 (file)
@@ -52,14 +52,17 @@ return [
     'columns' => [
         'disabled' => [
             'exclude' => true,
-            'label' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.disabled',
+            'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.enabled',
             'config' => [
                 'type' => 'check',
+                'renderType' => 'checkboxToggle',
                 'items' => [
-                    '1' => [
-                        '0' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.disabled.0'
+                    [
+                        0 => '',
+                        1 => '',
+                        'invertStateDisplay' => true
                     ]
-                ]
+                ],
             ]
         ],
         'starttime' => [
@@ -112,29 +115,33 @@ return [
         ],
         'force_https' => [
             'exclude' => true,
-            'label' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.force_https',
+            'label' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.force_https.0',
             'config' => [
                 'type' => 'check',
+                'renderType' => 'checkboxToggle',
                 'default' => 0,
                 'items' => [
-                    '1' => [
-                        '0' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.force_https.0'
+                    [
+                        0 => '',
+                        1 => '',
                     ]
-                ]
-            ],
+                ],
+            ]
         ],
         'keep_query_parameters' => [
             'exclude' => true,
-            'label' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.keep_query_parameters',
+            'label' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.keep_query_parameters.0',
             'config' => [
                 'type' => 'check',
+                'renderType' => 'checkboxToggle',
                 'default' => 0,
                 'items' => [
-                    '1' => [
-                        '0' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.keep_query_parameters.0'
+                    [
+                        0 => '',
+                        1 => '',
                     ]
-                ]
-            ],
+                ],
+            ]
         ],
         'target' => [
             'label' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.target',
@@ -193,14 +200,19 @@ return [
         ],
         'disable_hitcount' => [
             'exclude' => true,
-            'label' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.disable_hitcount',
+            'label' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.hitcountState',
             'config' => [
                 'type' => 'check',
+                'renderType' => 'checkboxLabeledToggle',
                 'items' => [
-                    '1' => [
-                        '0' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.disable_hitcount.0'
+                    [
+                        0 => '',
+                        1 => '',
+                        'labelChecked' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.enabled',
+                        'labelUnchecked' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.disabled',
+                        'invertStateDisplay' => true
                     ]
-                ]
+                ],
             ],
             'displayCond' => 'USER:TYPO3\CMS\Redirects\UserFunctions\HitCountDisplayCondition->isEnabled'
         ],
@@ -209,12 +221,14 @@ return [
             'label' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.is_regexp',
             'config' => [
                 'type' => 'check',
+                'renderType' => 'checkboxToggle',
                 'items' => [
-                    '1' => [
-                        '0' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.is_regexp.0'
+                    [
+                        0 => '',
+                        1 => '',
                     ]
-                ]
-            ],
+                ],
+            ]
         ],
     ],
 ];
index 7b12a9b..07761d0 100644 (file)
@@ -48,6 +48,9 @@
                        <trans-unit id="sys_redirect.lasthiton">
                                <source>Last Hit On</source>
                        </trans-unit>
+                       <trans-unit id="sys_redirect.hitcountState">
+                               <source>Hit Counter</source>
+                       </trans-unit>
                        <trans-unit id="sys_redirect.disable_hitcount">
                                <source>Disable Hit Counter</source>
                        </trans-unit>