/** * Manages all models. */ public function actionAdmin() { $model = new Evento('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Evento'])) { $model->attributes = $_GET['Evento']; } $this->render('admin', array('model' => $model)); }
/** * Manages all models. */ public function actionAdmin() { //Yii::app()->clientScript->registerScript('uniqueid', 'alert("ok");alert("ok2");'); $model = new Evento('search'); $model_paciente = Paciente::model()->findAll(); $autoCompletePaciente = Base::toAutoCompleteFormat($model_paciente); $model->unsetAttributes(); // clear any default values if (isset($_GET['Evento'])) { $model->attributes = $_GET['Evento']; } $this->render('admin', array('model' => $model, 'calendarJSON' => $this->cargarEventos(), 'model_paciente' => $model_paciente, 'autoCompletePaciente' => $autoCompletePaciente)); }