/** * 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 $id the ID of the model to be loaded * @return VehicleType the loaded model * @throws CHttpException */ public function loadModel($id) { $model = VehicleType::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }
</div> <div class="row"> <div style="float:left;width:200px;" > <?php echo $form->labelEx($model, 'vehicle_category'); ?> <?php echo $form->dropDownList($model, 'vehicle_category', CHtml::listData(VehicleCatagory::model()->findAll(array('order' => 'id ASC')), 'id', 'name'), array('span' => 5, 'maxlength' => 45)); ?> </div> <div style="float:left;width:200px;" > <?php echo $form->labelEx($model, 'vehicle_type'); ?> <?php echo $form->dropDownList($model, 'vehicle_type', CHtml::listData(VehicleType::model()->findAll(array('order' => 'type ASC')), 'id', 'type'), array('span' => 5, 'maxlength' => 45)); ?> </div> <div style="float:left;width:200px;" > <?php echo $form->labelEx($model, 'vehicle_make_id'); ?> <?php echo $form->dropDownList($model, 'vehicle_make_id', CHtml::listData(VehicleMake::model()->findAll(array('order' => 'vehicle_make ASC', 'condition' => 'vehicle_make not like ""')), 'id', 'vehicle_make'), array('empty' => '--Select vehicle make--', 'span' => 5, 'maxlength' => 45)); ?> </div> </div> <div class="row"> <div style="float:left;width:200px;" > <?php echo $form->labelEx($model, 'challan_state_id');