<section  class="col col-6">
                                                <label class="input">
                                                    <i class="icon-append fa fa-tag"></i>
                                                    <?php 
echo $form->textField($Carrera, 'NombreCarrera', array('type' => "text", 'name' => "NombreCarrera", 'placeholder' => "Nombre de la Carrera", 'size' => 60, 'maxlength' => 500));
?>
                                                    <b class="tooltip tooltip-bottom-right">Creando nueva Carrera </b>
                                                </label>
                                            </section>


                                              <section  class="col col-6">
                                                <label class="select">
                                                    
                                                    <?php 
echo $form->dropDownList($Carrera, 'TipoCarrera_idTipoCarrera', CHtml::listData(TipoCarrera::model()->findAll("Activo=?", array(1)), "idTipoCarrera", "Nombre"), array('prompt' => 'Seleccione tipo de Carrera', 'name' => 'TipoCarreraId'));
?>
                                                      <i></i>
                                                   
                                                </label>

                                               

                                            
                                            </section>

                                    </div>
                                    </fieldset>

                                       
                                    </div>
 public function actionActualizarEstadoTipoCarrera()
 {
     date_default_timezone_set('America/Tegucigalpa');
     $tipoCarrera = TipoCarrera::model()->findByPk($_POST['pk']);
     $tipoCarrera->Activo = $_POST['value'];
     $tipoCarrera->ModificadoPor = Yii::app()->user->name;
     $tipoCarrera->FechaModificacion = date('Y-m-d H:i:s');
     $tipoCarrera->Save();
 }
Пример #3
0
 public function getMenuTipoCarrera()
 {
     $criteria = new CDbCriteria();
     $criteria->order = 'Nombre';
     return CHtml::listData(TipoCarrera::model()->findAll($criteria), "idTipoCarrera", "Nombre");
 }
 /**
  * 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 TipoCarrera the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = TipoCarrera::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }