From 365b8f36c5628c7659081248677d4a27389d082a Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sun, 6 Jan 2019 17:32:11 +0100 Subject: [PATCH] Decrease the clickable whitespace for checkbox lists See #2698 --- .../install/files/acp/templates/userAdd.tpl | 2 +- .../option/CheckboxesOptionType.class.php | 7 +++++++ .../option/RadioButtonOptionType.class.php | 7 +++++++ .../BBCodeSelectUserGroupOptionType.class.php | 7 +++++++ .../UserGroupsUserGroupOptionType.class.php | 7 +++++++ wcfsetup/install/files/style/element/dl.scss | 19 +++++++++++++++++++ 6 files changed, 48 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/acp/templates/userAdd.tpl b/wcfsetup/install/files/acp/templates/userAdd.tpl index 11e8b1fd4d..aab3972fec 100644 --- a/wcfsetup/install/files/acp/templates/userAdd.tpl +++ b/wcfsetup/install/files/acp/templates/userAdd.tpl @@ -71,7 +71,7 @@
-
+
{htmlCheckboxes options=$availableGroups name=groupIDs selected=$groupIDs}
diff --git a/wcfsetup/install/files/lib/system/option/CheckboxesOptionType.class.php b/wcfsetup/install/files/lib/system/option/CheckboxesOptionType.class.php index 496fed9d98..b6eaaaff56 100644 --- a/wcfsetup/install/files/lib/system/option/CheckboxesOptionType.class.php +++ b/wcfsetup/install/files/lib/system/option/CheckboxesOptionType.class.php @@ -19,4 +19,11 @@ class CheckboxesOptionType extends MultiSelectOptionType { * @inheritDoc */ protected $searchableFormElementTemplate = 'checkboxesSearchableOptionType'; + + /** + * @inheritDoc + */ + public function getCSSClassName() { + return 'checkboxList'; + } } diff --git a/wcfsetup/install/files/lib/system/option/RadioButtonOptionType.class.php b/wcfsetup/install/files/lib/system/option/RadioButtonOptionType.class.php index 585e82e2b9..239c079812 100644 --- a/wcfsetup/install/files/lib/system/option/RadioButtonOptionType.class.php +++ b/wcfsetup/install/files/lib/system/option/RadioButtonOptionType.class.php @@ -121,4 +121,11 @@ class RadioButtonOptionType extends AbstractOptionType implements ISearchableCon protected function getSelectOptions(Option $option) { return $option->parseSelectOptions(); } + + /** + * @inheritDoc + */ + public function getCSSClassName() { + return 'checkboxList'; + } } diff --git a/wcfsetup/install/files/lib/system/option/user/group/BBCodeSelectUserGroupOptionType.class.php b/wcfsetup/install/files/lib/system/option/user/group/BBCodeSelectUserGroupOptionType.class.php index 8a6532783d..50106aa9fb 100644 --- a/wcfsetup/install/files/lib/system/option/user/group/BBCodeSelectUserGroupOptionType.class.php +++ b/wcfsetup/install/files/lib/system/option/user/group/BBCodeSelectUserGroupOptionType.class.php @@ -147,4 +147,11 @@ class BBCodeSelectUserGroupOptionType extends AbstractOptionType implements IUse // both lists of BBCodes are equal return 0; } + + /** + * @inheritDoc + */ + public function getCSSClassName() { + return 'checkboxList'; + } } diff --git a/wcfsetup/install/files/lib/system/option/user/group/UserGroupsUserGroupOptionType.class.php b/wcfsetup/install/files/lib/system/option/user/group/UserGroupsUserGroupOptionType.class.php index 863bdfe7cf..5fadc2bdd0 100644 --- a/wcfsetup/install/files/lib/system/option/user/group/UserGroupsUserGroupOptionType.class.php +++ b/wcfsetup/install/files/lib/system/option/user/group/UserGroupsUserGroupOptionType.class.php @@ -96,4 +96,11 @@ class UserGroupsUserGroupOptionType extends AbstractOptionType implements IUserG // both lists are equal return 0; } + + /** + * @inheritDoc + */ + public function getCSSClassName() { + return 'checkboxList'; + } } diff --git a/wcfsetup/install/files/style/element/dl.scss b/wcfsetup/install/files/style/element/dl.scss index 9c5c37ca04..022f3d821e 100644 --- a/wcfsetup/install/files/style/element/dl.scss +++ b/wcfsetup/install/files/style/element/dl.scss @@ -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 { -- 2.20.1