[BUGFIX] Improve checkboxes in user settings 37/34437/2
authorGeorg Ringer <georg.ringer@gmail.com>
Fri, 21 Nov 2014 10:42:45 +0000 (11:42 +0100)
committerMarkus Klein <klein.t3@reelworx.at>
Fri, 21 Nov 2014 13:26:44 +0000 (14:26 +0100)
Change-Id: Ifb72a8cb8236a370dab9c6d8604adf7ba02fc06d
Resolves: #63125
Releases: master
Reviewed-on: http://review.typo3.org/34437
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
typo3/sysext/setup/Classes/Controller/SetupModuleController.php

index f84edc8..e99e848 100644 (file)
@@ -475,7 +475,10 @@ class SetupModuleController {
                        $label = $this->getCSH($config['csh'] ?: $fieldName, $label);
                        $type = $config['type'];
                        $class = $config['class'];
-                       $class .= ' form-control';
+
+                       if ($type !== 'check') {
+                               $class .= ' form-control';
+                       }
 
                        $style = $config['style'];
                        if ($class) {
@@ -515,12 +518,13 @@ class SetupModuleController {
                                        break;
                                }
                                case 'check': {
-                                       $html = '<input id="field_' . $fieldName . '"
+                                       $html = $label . '<div class="checkbox"><label><input id="field_' . $fieldName . '"
                                                type="checkbox"
                                                name="data' . $dataAdd . '[' . $fieldName . ']"' .
                                                ($value ? ' checked="checked"' : '') .
                                                $more .
-                                               ' />';
+                                               ' /></label></div>';
+                                       $label = '';
                                        break;
                                }
                                case 'select': {