Example #1
0
 /**
  * Load default decorators
  *
  * Disables "for" attribute of label if label decorator enabled.
  *
  * @return void
  */
 public function loadDefaultDecorators()
 {
     parent::loadDefaultDecorators();
     if (false !== ($decorator = $this->getDecorator('Label'))) {
         $decorator->setOption('disableFor', true);
     }
 }
Example #2
0
 /**
  * Load default decorators
  *
  * Disables "for" attribute of label if label decorator enabled.
  *
  * @return void
  */
 public function loadDefaultDecorators()
 {
     if ($this->loadDefaultDecoratorsIsDisabled()) {
         return;
     }
     parent::loadDefaultDecorators();
     $this->addDecorator('Label', array('tag' => 'dt', 'disableFor' => true));
 }
 /**
  * Load default decorators
  *
  * @return Zend_Form_Element_MultiCheckbox
  */
 public function loadDefaultDecorators()
 {
     if ($this->loadDefaultDecoratorsIsDisabled()) {
         return $this;
     }
     parent::loadDefaultDecorators();
     // Disable 'for' attribute
     if (false !== ($decorator = $this->getDecorator('label'))) {
         $decorator->setOption('disableFor', true);
     }
     return $this;
 }
Example #4
0
File: Radio.php Project: webino/zf1
 /**
  * Load default decorators
  *
  * Disables "for" attribute of label if label decorator enabled.
  *
  * @return Zend_Form_Element_Radio
  */
 public function loadDefaultDecorators()
 {
     if ($this->loadDefaultDecoratorsIsDisabled()) {
         return $this;
     }
     parent::loadDefaultDecorators();
     // Disable 'for' attribute
     if (isset($this->_decorators['Label']) && !isset($this->_decorators['Label']['options']['disableFor'])) {
         $this->_decorators['Label']['options']['disableFor'] = true;
     }
     return $this;
 }