/**
  * 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 PreguntaMadre the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = PreguntaMadre::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
예제 #2
0
                    <h3 class="no-margin"><i class="fa fa-pencil-square"></i>Editar Pregunta Especifica</h3>
                </div>
                <div class="modal-body padding-10">
                    <form id="editarPreguntaEspesifica" action="<?php 
echo Yii::app()->getBaseUrl(true) . '/index.php?r=GradoMadurez/preguntaEspecifica/update';
?>
" method="post">
                        <div class="form-group">
                            <div class="col-sm-12">
                                <label for="form-field-22">
                                    Pregunta Madre
                                    <span class="symbol required"></span>
                                </label>
                                <select id="idPreguntaMadreEditarr" name="idPreguntaMadreEditarr" class="js-example-basic-single" tabindex="-1" aria-hidden="true" style="width:100%; height: 40px;">
                                    <?php 
$preguntaMadre = new PreguntaMadre();
$preguntasMadres = $preguntaMadre->findAll();
foreach ($preguntasMadres as $value) {
    ?>
 
                                        <option value="<?php 
    echo $value->id_pregunta_madre;
    ?>
">
                                            <?php 
    echo $value->nombre;
}
?>
 
                                </select> 
                            </div>