From: Cyperghost Date: Mon, 18 Nov 2024 10:46:09 +0000 (+0100) Subject: Read custom value X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1be39f2b904ec7e2d289167eed760a6ac3400ccf;p=GitHub%2FWoltLab%2FWCF.git Read custom value --- diff --git a/wcfsetup/install/files/lib/system/form/builder/field/BadgeColorFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/BadgeColorFormField.class.php index 7c2dd684d8..e1a433e8af 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/BadgeColorFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/BadgeColorFormField.class.php @@ -86,6 +86,19 @@ final class BadgeColorFormField extends RadioButtonFormField implements IPattern } } + #[\Override] + public function value($value) + { + if (!\in_array($value, self::AVAILABLE_CSS_CLASSNAMES)) { + parent::value('custom'); + $this->customClassName = $value; + } else { + parent::value($value); + } + + return $this; + } + #[\Override] public function getSaveValue() {