?> </div> </div>--> <?php echo $form->textFieldRow($model, 'nombre', array('maxlength' => 65)); ?> <?php /* echo $form->datepickerRow($model, 'fecha_emision', array('prepend' => '<i class="icon-calendar"></i>')) */ ?> <?php echo $form->dropDownListRow($model, 'tipo_informe_id', array('' => ' -- Seleccione -- ') + CHtml::listData(TipoInforme::model()->findAll(), 'id', TipoInforme::representingColumn()), array('placeholder' => null)); ?> <?php echo $form->dropDownListRow($model, 'prioridad_informe_id', array('' => ' -- Seleccione -- ') + CHtml::listData(PrioridadInforme::model()->findAll(), 'id', PrioridadInforme::representingColumn()), array('placeholder' => null)); ?> <?php // echo $form->textFieldRow($model, 'entidad_id') ?> <?php // if ($model->isNewRecord) { $modelEmpleado = EmpleadoSubalterno::model()->find('subalterno_id=:idEmpleado', array(':idEmpleado' => $model->entidad_id)); if (Yii::app()->user->id == 1 && $modelEmpleado == null) { $modelEmpleado = Empleado::model()->activos()->findAll(); } else { if ($modelEmpleado != null) { $modelEmpleado = Empleado::model()->findByPk($modelEmpleado->empleado_id); $array[0] = $modelEmpleado;
/** * 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 the ID of the model to be loaded */ public function loadModel($id, $modelClass = __CLASS__) { $model = PrioridadInforme::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }