[TASK] Change checkboxes in be_groups and be_users to new rendertype 41/56741/10
authorIngo Nolden <dev@nolden.org>
Thu, 19 Apr 2018 16:17:05 +0000 (18:17 +0200)
committerBenjamin Kott <benjamin.kott@outlook.com>
Fri, 27 Apr 2018 09:34:35 +0000 (11:34 +0200)
Some checkboxes are changed to new rendertype checkboxToggle.
One checkbox label (IPlockState) is added.

Resolves: #84794
Related: #84793
Releases: master
Change-Id: I6acc23d5e72e561e5cb84de84d73abe15a3839fd
Reviewed-on: https://review.typo3.org/56741
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Benjamin Kott <benjamin.kott@outlook.com>
Tested-by: Benjamin Kott <benjamin.kott@outlook.com>
typo3/sysext/core/Configuration/TCA/be_groups.php
typo3/sysext/core/Configuration/TCA/be_users.php
typo3/sysext/core/Resources/Private/Language/locallang_tca.xlf

index 20a7e46..0e8fa66 100644 (file)
@@ -110,15 +110,21 @@ return [
             ]
         ],
         'workspace_perms' => [
+            'exclude' => 1,
             'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:workspace_perms',
             'config' => [
                 'type' => 'check',
+                'renderType' => 'checkboxToggle',
+                'default' => 0,
                 'items' => [
-                    ['LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:workspace_perms_live', 0]
+                    [
+                        0 => 'LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:workspace_perms_live',
+                        1 => '',
+                    ],
                 ],
-                'default' => 0
             ]
         ],
+
         'pagetypes_select' => [
             'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:be_groups.pagetypes_select',
             'config' => [
@@ -187,10 +193,19 @@ return [
             ]
         ],
         'hidden' => [
-            'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.disable',
+            'exclude' => 1,
+            'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.enabled',
             'config' => [
                 'type' => 'check',
-                'default' => 0
+                'renderType' => 'checkboxToggle',
+                'default' => 0,
+                'items' => [
+                    [
+                        0 => '',
+                        1 => '',
+                        'invertStateDisplay' => true
+                    ],
+                ],
             ]
         ],
         'lockToDomain' => [
index 7284e8e..82189c5 100644 (file)
@@ -175,22 +175,50 @@ return [
             ]
         ],
         'disable' => [
-            'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.disable',
+            'exclude' => 1,
+            'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.enabled',
             'config' => [
-                'type' => 'check'
+                'type' => 'check',
+                'renderType' => 'checkboxToggle',
+                'items' => [
+                    [
+                        0 => '',
+                        1 => '',
+                        'invertStateDisplay' => true
+                    ],
+                ],
             ]
         ],
         'disableIPlock' => [
-            'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:be_users.disableIPlock',
+            'exclude' => 1,
+            'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:be_users.IPlockState',
             'config' => [
-                'type' => 'check'
+                'type' => 'check',
+                'renderType' => 'checkboxLabeledToggle',
+                'items' => [
+                    [
+                        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
+                    ],
+                ],
             ]
         ],
         'admin' => [
+            'exclude' => 1,
             'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:be_users.admin',
             'config' => [
                 'type' => 'check',
-                'default' => 0
+                'renderType' => 'checkboxToggle',
+                'default' => 0,
+                'items' => [
+                    [
+                        0 => '',
+                        1 => '',
+                    ],
+                ],
             ]
         ],
         'options' => [
@@ -235,13 +263,18 @@ return [
             ]
         ],
         'workspace_perms' => [
+            'exclude' => 1,
             'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:workspace_perms',
             'config' => [
                 'type' => 'check',
+                'renderType' => 'checkboxToggle',
+                'default' => 1,
                 'items' => [
-                    ['LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:workspace_perms_live', 0]
+                    [
+                        0 => 'LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:workspace_perms_live',
+                        1 => '',
+                    ],
                 ],
-                'default' => 1
             ]
         ],
         'starttime' => [
index f177bb2..514d7a3 100644 (file)
@@ -72,6 +72,9 @@
                        <trans-unit id="be_users.disableIPlock">
                                <source>Disable IP lock for user</source>
                        </trans-unit>
+                       <trans-unit id="be_users.IPlockState">
+                               <source>IP lock for user</source>
+                       </trans-unit>
                        <trans-unit id="be_users.admin">
                                <source>Admin (!)</source>
                        </trans-unit>