Example #1
0
 /**
  * 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 CMotivo the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = CMotivo::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
Example #2
0
			<div style='float: left;'>
				<?php 
echo $form->error($model, 'n_direc');
?>
			</div>





			<div class="row">
				<?php 
echo $form->labelEx($model, 'c_motivo');
?>
				<?php 
$datos1 = CHtml::listData(CMotivo::model()->findAll(array('order' => 'desmotivo')), 'codmotivo', 'desmotivo');
echo $form->DropDownList($model, 'c_motivo', $datos1, array('empty' => '--Seleccione un motivo--', 'disabled' => $this->eseditable($model->c_estgui)));
?>
				<?php 
echo $form->error($model, 'c_motivo');
?>
			</div>
			<div class="row">
				<?php 
echo $form->labelEx($model, 'c_desgui');
?>
				<?php 
echo $form->textField($model, 'c_desgui', array('size' => 40, 'maxlength' => 40, 'disabled' => $this->eseditable($model->c_estgui)));
?>
				<?php 
echo $form->error($model, 'c_desgui');