Used for rendering inputs according to Bootstrap standards.
Inheritance: extends CInputWidget
Exemplo n.º 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();
 }
Exemplo n.º 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>';
     }
 }
Exemplo n.º 3
0
 /**
  * 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();
 }
Exemplo n.º 4
0
 /**
  * Runs the widget.
  */
 public function run()
 {
     echo CHtml::openTag('div', array('class' => 'form-group ' . $this->getContainerCssClass()));
     parent::run();
     echo CHtml::closeTag('div');
 }