Exemplo n.º 1
0
		<?php echo $form->labelEx($model,'TelMovil'); ?>
		<?php echo $form->textField($model,'TelMovil'); ?>
		<?php echo $form->error($model,'TelMovil'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'Email'); ?>
		<?php echo $form->textField($model,'Email',array('size'=>50,'maxlength'=>50)); ?>
		<?php echo $form->error($model,'Email'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'Nombre Aseguradora'); ?>
		<?php echo $form->dropDownList($model,'idAseguradora',
		
			CHtml::listData(Aseguradoras::model()->findAll(),'idAseguradora','Nombre')
		); ?>
		<?php echo $form->error($model,'idAseguradora'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'Notas'); ?>
		<?php echo $form->textField($model,'Notas',array('size'=>60,'maxlength'=>150)); ?>
		<?php echo $form->error($model,'Notas'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Crear' : 'Guardar'); ?>
	</div>

<?php $this->endWidget(); ?>
 /**
  * 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 Aseguradoras the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = Aseguradoras::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }