Esempio n. 1
0
$form = $this->beginWidget('CActiveForm', array('id' => 'condicion-form', 'enableAjaxValidation' => false));
?>

	<p class="note">Campos marcados con <span class="required">*</span> son obligatorios.</p>

	<?php 
echo $form->errorSummary($model);
?>


	<div class="row">
		<?php 
echo $form->labelEx($model, 'Ficha_Medica_idFicha_Medica');
?>
		<?php 
echo $form->dropDownList($model, 'Ficha_Medica_idFicha_Medica', CHtml::listData(FichaMedica::model()->findAll(), 'idFicha_Medica', 'idFicha_Medica'));
?>
		<?php 
echo $form->error($model, 'Ficha_Medica_idFicha_Medica');
?>
	</div>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'Detalle');
?>
		<?php 
echo $form->textField($model, 'Detalle', array('size' => 60, 'maxlength' => 255));
?>
		<?php 
echo $form->error($model, 'Detalle');
Esempio n. 2
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 FichaMedica the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = FichaMedica::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }