Decrease the clickable whitespace for checkbox lists
authorAlexander Ebert <ebert@woltlab.com>
Sun, 6 Jan 2019 16:32:11 +0000 (17:32 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Sun, 6 Jan 2019 16:32:11 +0000 (17:32 +0100)
See #2698

wcfsetup/install/files/acp/templates/userAdd.tpl
wcfsetup/install/files/lib/system/option/CheckboxesOptionType.class.php
wcfsetup/install/files/lib/system/option/RadioButtonOptionType.class.php
wcfsetup/install/files/lib/system/option/user/group/BBCodeSelectUserGroupOptionType.class.php
wcfsetup/install/files/lib/system/option/user/group/UserGroupsUserGroupOptionType.class.php
wcfsetup/install/files/style/element/dl.scss

index 11e8b1fd4d28c1c597631501a5dab1f3df1b3862..aab3972fece9978e5e4af6b1b3e1b616b12fd44a 100644 (file)
@@ -71,7 +71,7 @@
                                                <dt>
                                                        <label>{lang}wcf.acp.user.groups{/lang}</label>
                                                </dt>
-                                               <dd>
+                                               <dd class="checkboxList">
                                                        {htmlCheckboxes options=$availableGroups name=groupIDs selected=$groupIDs}
                                                </dd>
                                        </dl>
index 496fed9d98bf3e0d5a07c830e999a0770dbb1cdb..b6eaaaff56c5b3af4664a26038f460479c9ddcd7 100644 (file)
@@ -19,4 +19,11 @@ class CheckboxesOptionType extends MultiSelectOptionType {
         * @inheritDoc
         */
        protected $searchableFormElementTemplate = 'checkboxesSearchableOptionType';
+       
+       /**
+        * @inheritDoc
+        */
+       public function getCSSClassName() {
+               return 'checkboxList';
+       }
 }
index 585e82e2b98d3387d8a89c1f2d2fc53bd4266e37..239c07981249e6141dcc8b0826d0e6b348c88de6 100644 (file)
@@ -121,4 +121,11 @@ class RadioButtonOptionType extends AbstractOptionType implements ISearchableCon
        protected function getSelectOptions(Option $option) {
                return $option->parseSelectOptions();
        }
+       
+       /**
+        * @inheritDoc
+        */
+       public function getCSSClassName() {
+               return 'checkboxList';
+       }
 }
index 8a6532783d3294dbb461404b5f4c9531ef6821bc..50106aa9fbd96d0dd82095e3a920f5f6ffd4232f 100644 (file)
@@ -147,4 +147,11 @@ class BBCodeSelectUserGroupOptionType extends AbstractOptionType implements IUse
                // both lists of BBCodes are equal
                return 0;
        }
+       
+       /**
+        * @inheritDoc
+        */
+       public function getCSSClassName() {
+               return 'checkboxList';
+       }
 }
index 863bdfe7cfed4bc88fb49a82a132fed50baa27bb..5fadc2bdd05ff4ed75803a95a1bb45df91521914 100644 (file)
@@ -96,4 +96,11 @@ class UserGroupsUserGroupOptionType extends AbstractOptionType implements IUserG
                // both lists are equal
                return 0;
        }
+       
+       /**
+        * @inheritDoc
+        */
+       public function getCSSClassName() {
+               return 'checkboxList';
+       }
 }
index 9c5c37ca044207f2ee4d292bb8b892d4623b4751..022f3d821ec3a08ccf482d58cd0233eb708c3556 100644 (file)
@@ -68,6 +68,25 @@ dl {
                &.wide > dt {
                        display: none;
                }
+               
+               /* The option */
+               dt.checkboxList + dd,
+               dd.checkboxList {
+                       &::after {
+                               content: "";
+                               clear: both;
+                               display: table;
+                       }
+                       
+                       label {
+                               float: left;
+                               clear: both;
+                       }
+                       
+                       small {
+                               clear: both;
+                       }
+               }
        }
        
        &.floated > dd {