public function executeNew(sfWebRequest $request) { $PeriodoAcademico = new PeriodoAcademico(); $PeriodoAcademico->setCodigo('indefinido'); $PeriodoAcademico->setInicio(time()); $PeriodoAcademico->setFin(date('d-m-Y H:i:s', time() + 86400 * 30)); $this->form = $this->configuration->getForm($PeriodoAcademico); $this->PeriodoAcademico = $this->form->getObject(); }
/** * 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 PeriodoAcademico the loaded model * @throws CHttpException */ public function loadModel($id) { $model = PeriodoAcademico::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }
public function actionPeriodoAcademico() { $PeriodoAcademico = new PeriodoAcademico('BusquedaPeriodosActivos'); $PeriodoAcademico->unsetAttributes(); if (isset($_GET['PeriodoAcademico'])) { $PeriodoAcademico->attributes = $_GET['PeriodoAcademico']; } $this->render('PeriodoAcademico', array('PeriodoAcademico' => $PeriodoAcademico)); }
}')), 'options' => array('width' => '100%'), 'events' => array("change" => 'js:function(){ $("#AsesorCurso2").select2("val", "");}'))); ?> <br> <br> <div class="row "> <section class="col col-6"> <?php $this->widget('booster.widgets.TbSelect2', array('name' => 'AsesorCurso2', 'options' => array('placeholder' => 'Seleccione el asesor *', 'width' => '100%'))); ?> </section> <section class="col col-6"> <?php $this->widget('booster.widgets.TbSelect2', array('name' => 'PeriodoAcademicoCurso2', 'data' => CHtml::listData(PeriodoAcademico::model()->findAll("Activo=?", array(1)), 'IdPeriodoAcademico', 'PeriodoConcatenado'), 'options' => array('placeholder' => 'Periodo Académico *', 'width' => '100%'))); ?> </section> </div> </fieldset> </div>