Exemple #1
0
  <div class="panelizquierdo">
	
	
			<?php 
// esl estado es '01' POR DEFAULT '
echo $form->hiddenField($model, 'codestado', array('value' => '10', 'border' => 0));
?>



	  <div class="row">
		  <?php 
echo $form->labelEx($model, 'tipo');
?>
		  <?php 
$datos = CHtml::listData(Tipoactivos::model()->findAll(), 'codtipo', 'destipo');
echo $form->DropDownList($model, 'tipo', $datos, array('empty' => '--Indique el tipo--'));
?>
		  <?php 
echo $form->error($model, 'tipo');
?>
	  </div>
	  <div class="row">
						<?php 
echo $form->labelEx($model, 'codigoaf');
?>
					
						<?php 
echo $form->textField($model, 'codigoaf', array('size' => 14, 'maxlength' => 14));
?>
					<?php 
 /**
  * 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 Tipoactivos the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = Tipoactivos::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }