Add missing method in `RadioButtonFormField`
authorMatthias Schmidt <gravatronics@live.com>
Sat, 7 Jul 2018 15:22:02 +0000 (17:22 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Sat, 7 Jul 2018 15:22:02 +0000 (17:22 +0200)
See 89f146f98c612e7924de77816920cf9553ef626a
See #2509

wcfsetup/install/files/lib/system/form/builder/field/RadioButtonFormField.class.php

index 0353cb403468f5061c6fec50db315992c64378b8..d6cd83e3de4e5b05386ec549312b30fa5baaf2f4 100644 (file)
@@ -21,7 +21,22 @@ class RadioButtonFormField extends AbstractFormField implements ISelectionFormFi
        /**
         * @inheritDoc
         */
-       protected static function supportsNestedOptions(): bool {
+       public function readValue(): IFormField {
+               if ($this->getDocument()->hasRequestData($this->getPrefixedId())) {
+                       $value = $this->getDocument()->getRequestData($this->getPrefixedId());
+                       
+                       if (is_string($value)) {
+                               $this->__value = $value;
+                       }
+               }
+               
+               return $this;
+       }
+       
+       /**
+        * @inheritDoc
+        */
+       public function supportsNestedOptions(): bool {
                return false;
        }
 }