Used for rendering inputs according to Bootstrap standards.
Inheritance: extends CInputWidget
Example #1
0
 /**
  * Returns the label for this block.
  * @return string the label
  */
 protected function getLabel()
 {
     if (isset($this->labelOptions['class'])) {
         $this->labelOptions['class'] .= ' control-label';
     } else {
         $this->labelOptions['class'] = 'control-label';
     }
     return parent::getLabel();
 }
Example #2
0
 /**
  * Runs the widget.
  */
 public function run()
 {
     if ($this->useFormGroup == true) {
         echo CHtml::openTag('div', array('class' => 'form-group ' . $this->getContainerCssClass()));
     }
     parent::run();
     if ($this->useFormGroup == true) {
         echo '</div>';
     }
 }
 /**
  * Returns the label for this block.
  * @return string the label
  */
 protected function getLabel()
 {
     if (isset($this->labelOptions['class'])) {
         $this->labelOptions['class'] .= ' control-label col-md-3';
     } else {
         $this->labelOptions['class'] = 'control-label col-md-3';
     }
     if (isset($this->htmlOptions['id'])) {
         $this->labelOptions['for'] = $this->htmlOptions['id'];
     }
     return parent::getLabel();
 }
 /**
  * Runs the widget.
  */
 public function run()
 {
     echo CHtml::openTag('div', array('class' => 'form-group ' . $this->getContainerCssClass()));
     parent::run();
     echo CHtml::closeTag('div');
 }