<?php echo $form->textFieldGroup($model, 'pais', array('widgetOptions' => array('htmlOptions' => array('class' => 'span5', 'maxlength' => 30)))); ?> <?php echo $form->textFieldGroup($model, 'color1', array('widgetOptions' => array('htmlOptions' => array('class' => 'span5', 'maxlength' => 30)))); ?> <?php echo $form->textFieldGroup($model, 'color2', array('widgetOptions' => array('htmlOptions' => array('class' => 'span5', 'maxlength' => 30)))); ?> <?php echo $form->dropDownListGroup($model, 'idtipo', array('wrapperHtmlOptions' => array('class' => 'col-sm-5'), 'widgetOptions' => array('data' => CHtml::listData(Tipoveh::model()->findAll('estado=1'), 'id', 'nombre'), 'htmlOptions' => array('empty' => 'Seleccione')))); ?> <?php echo $form->textFieldGroup($model, 'anio', array('widgetOptions' => array('htmlOptions' => array('class' => 'span5', 'maxlength' => 4)))); ?> <?php echo $form->dropDownListGroup($model, 'id_propietario', array('wrapperHtmlOptions' => array('class' => 'col-sm-5'), 'widgetOptions' => array('data' => CHtml::listData(Propietario::model()->findAll('estado=1'), 'id_propietario', 'nom_pro'), 'htmlOptions' => array('empty' => 'Seleccione')))); ?> <?php echo $form->switchGroup($model, 'estado', array('widgetOptions' => array('events' => array('switchChange' => 'js:function(event, state) { console.log(this); // DOM element console.log(event); // jQuery event
/** * Returns the data model based on the primary key given in the GET variable. * If the data model is not found, an HTTP exception will be raised. * @param integer the ID of the model to be loaded */ public function loadModel($id) { $model = Tipoveh::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }