Small optimization
authorMarcel Werk <burntime@woltlab.com>
Fri, 17 May 2013 16:24:29 +0000 (18:24 +0200)
committerMarcel Werk <burntime@woltlab.com>
Fri, 17 May 2013 16:24:29 +0000 (18:24 +0200)
wcfsetup/install/files/lib/system/form/element/AbstractNamedFormElement.class.php
wcfsetup/install/files/lib/system/form/element/MultipleSelectionFormElement.class.php
wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php

index 61e0c39e618586600b3cd21320d43649efe97503..007c0f776b68ca501cd6377cfc43638407637185 100644 (file)
@@ -13,6 +13,12 @@ use wcf\util\StringUtil;
  * @category   Community Framework
  */
 abstract class AbstractNamedFormElement extends AbstractFormElement {
+       /**
+        * element description
+        * @var string
+        */
+       protected $description = '';
+       
        /**
         * element name
         * @var string
@@ -25,6 +31,24 @@ abstract class AbstractNamedFormElement extends AbstractFormElement {
         */
        protected $value = '';
        
+       /**
+        * Sets element description.
+        *
+        * @param       string          $description
+        */
+       public function setDescription($description) {
+               $this->description = $description;
+       }
+       
+       /**
+        * Returns element description.
+        *
+        * @return      string
+        */
+       public function getDescription() {
+               return $this->description;
+       }
+       
        /**
         * Sets element name.
         * 
index 8e7663d47ebf602b25ed0180d72e430f4907ddb2..8c2b0b7e1afaadf8d4caa09febfbd83a6da3f481 100644 (file)
@@ -30,6 +30,7 @@ class MultipleSelectionFormElement extends AbstractNamedFormElement {
        public function getHTML($formName) {
                return <<<HTML
 <label><input type="checkbox" name="{$formName}{$this->getParent()->getName()}[]" value="{$this->getValue()}" /> {$this->getLabel()}</label>
+<small>{$this->getDesciption()}</small>
 HTML;
        }
 }
index cbe79730112845d492c3b89bc7b8c4e52d283d7a..261cf9c3d7800a74b9989d6c6fb3fd2648c6c518 100644 (file)
@@ -655,6 +655,7 @@ class PackageInstallationDispatcher {
                                $optionalPackage->setName('optionalPackages');
                                $optionalPackage->setLabel($package['packageName']);
                                $optionalPackage->setValue($package['package']);
+                               $optionalPackage->setDescription($package['packageDescription']);
                                
                                $container->appendChild($optionalPackage);
                        }