/** * Updates a particular model. * If update is successful, the browser will be redirected to the 'view' page. * @param integer $id the ID of the model to be updated */ public function actionUpdate($id) { $model = $this->loadModel($id); // Uncomment the following line if AJAX validation is needed // $this->performAjaxValidation($model); if (isset($_POST['Dependencia'])) { $model->attributes = $_POST['Dependencia']; if ($model->save()) { $this->redirect(array('view', 'id' => $model->id)); } } $generos = Sexo::model()->findAll(array('select' => 'id, descripcion', 'order' => 'descripcion ASC')); $this->render('update', array('model' => $model, 'generos' => $generos)); }
/** * Updates a particular model * @param integer $id the ID of the model to be updated * @redirected to'view' page. */ public function actionUpdate($id) { $model = $this->loadModel($id); if (isset($_POST['Fbm3'])) { $model->attributes = $_POST['Fbm3']; if ($model->save()) { $this->redirect(array('view', 'id' => $model->id)); } } $responsables = Responsable::model()->findAll(); $profesiones = Profesion::model()->findAll(); $dps = Dependencia::model()->findAll(); $generos = Sexo::model()->findAll(); $this->render('update', array('model' => $model, 'responsables' => $responsables, 'profesiones' => $profesiones, 'dps' => $dps, 'generos' => $generos)); }
public function run() { DB::table('sexos')->truncate(); Sexo::create(array('nombre' => 'Femenino')); Sexo::create(array('nombre' => 'Masculino')); }
; ?> </div> <div class="row"> <?php echo $form->label($model, 'identidadtipo'); ?> <?php echo $form->dropDownListControlGroup($model, 'identidadtipo0', CHtml::listData(Entidadtipo::model()->findAll(array('order'=>'nombre')),'identidadtipo', 'nombre')); ?> </div> <div class="row"> <?php echo $form->label($model, 'idlocalidad'); ?> <?php echo $form->dropDownListControlGroup($model, 'idlocalidad0', CHtml::listData(Localidad::model()->findAll(array('order'=>'nombre')),'idlocalidad', 'nombre'), array('prompt' => 'No corresponde')); ?> </div> <div class="row"> <?php echo $form->label($model, 'idsexo'); ?> <?php echo $form->dropDownListControlGroup($model, 'idsexo0', CHtml::listData(Sexo::model()->findAll(array('order'=>'nombre')),'idsexo', 'nombre'), array('prompt' => 'No corresponde')); ?> </div> <div class="row"> <?php echo $form->label($model, 'iddocumentotipo'); ?> <?php echo $form->dropDownListControlGroup($model, 'iddocumentotipo0', CHtml::listData(Documentotipo::model()->findAll(array('order'=>'nombre')),'iddocumentotipo', 'nombre'), array('prompt' => 'No corresponde')); ?> </div> <div class="row"> <?php echo $form->label($model, 'idestadocivil'); ?> <?php echo $form->dropDownListControlGroup($model, 'idestadocivil0', CHtml::listData(Estadocivil::model()->findAll(array('order'=>'nombre')),'idestadocivil', 'nombre'), array('prompt' => 'No corresponde')); ?> </div> <div class="row"> <?php echo $form->label($model, 'idconyuge'); ?> <?php echo $form->dropDownListControlGroup($model, 'idconyuge0', CHtml::listData(Entidad::model()->findAll(array('order'=>'matricula')),'identidad', 'matricula'), array('prompt' => 'No corresponde')); ?>
function TrataDadosBasicos($template) { header('Content-Type: text/html; charset=iso-8859-1'); if (isset($_SESSION['caso']) && $_SESSION['caso'] != 0) { $c = new Caso(); $c->setCodigo($_SESSION['caso']); $c->CarregarCaso(); $selAreas = AreaConhecimento::MontaSelect($c->getArea()->getCodigo()); $selNiveis = NivelPergunta::MontaSelect($c->getNivelDificuldade()->getCodigo()); $template = str_replace("<!--txtnome-->", $c->getNome(), $template); $template = str_replace("<!--txtdescricao-->", $c->getDescricao(), $template); $template = str_replace("<!--opcoesarea-->", $selAreas, $template); $template = str_replace("<!--opcoesnivel-->", $selNiveis, $template); $template = str_replace("<!--opcoesativo-->", SimNao::SelectSimNao($c->getAtivo()), $template); $template = str_replace("<!--txtidade-->", $c->getIdadePac(), $template); $template = str_replace("<!--opcoessexo-->", Sexo::SelectSexo($c->getSexoPac()), $template); $template = str_replace("<!--txtidpaciente-->", $c->getIdPac(), $template); $template = str_replace("<!--opcoesetnia-->", Etnia::SelectEtnia($c->getEtnia()), $template); $template = str_replace("<!--txtNomePac-->", $c->getNomePaciente(), $template); $template = str_replace("<!--opcoesimagem-->", ImgPaciente::SelectImagem($c->getImagemPaciente()), $template); $template = str_replace("<!--txtcid10-->", $c->getCid10(), $template); $template = str_replace("<!--chkPublico-->", $c->getPublico() == "1" ? "checked=\"checked\"" : "", $template); $template = str_replace("<!--chkExigeLogin-->", $c->getExigeLogin() == "0" ? "checked=\"checked\"" : "", $template); } else { $template = str_replace("<!--txtnome-->", "", $template); $template = str_replace("<!--txtdescricao-->", "", $template); $template = str_replace("<!--opcoesarea-->", AreaConhecimento::MontaSelect(), $template); $template = str_replace("<!--opcoesnivel-->", NivelPergunta::MontaSelect(), $template); $template = str_replace("<!--opcoesativo-->", SimNao::SelectSimNao(), $template); $template = str_replace("<!--txtidade-->", "", $template); $template = str_replace("<!--opcoessexo-->", Sexo::SelectSexo(), $template); $template = str_replace("<!--txtidpaciente-->", "", $template); $template = str_replace("<!--opcoesetnia-->", Etnia::SelectEtnia(), $template); $template = str_replace("<!--txtNomePac-->", "", $template); $template = str_replace("<!--opcoesimagem-->", ImgPaciente::SelectImagem(), $template); $template = str_replace("<!--txtcid10-->", "", $template); $template = str_replace("<!--chkPublico-->", "", $template); $template = str_replace("<!--chkExigeLogin-->", "", $template); } return $template; }
public function getNuevo() { $sexos = Sexo::all(); $rhs = Rh::all(); return View::make('contactos.nuevo', array('sexos' => $sexos, 'rhs' => $rhs)); }
<?php echo "<div class='control-group'>"; echo $form->dropDownList($model, 'iddocumentotipo', CHtml::listData(Documentotipo::model()->findAll(array('order' => 'nombre')), 'iddocumentotipo', 'abreviatura'), array('style' => 'margin-left:20px;width:70px;')); ?> <?php echo $form->labelEx($model, 'documentonro', $htmlOptions = array("class" => 'control-label ')); echo $form->textField($model, 'documentonro', array('size' => 10, 'maxlength' => 10, 'style' => 'margin-left:20px;')); echo "</div>"; echo "<div class='control-group'>"; echo $form->inlineRadioButtonListControlGroup($model, 'idsexo', CHtml::listData(Sexo::model()->findAll(array('order' => 'nombre')), 'idsexo', 'nombre'), array('prompt' => 'No corresponde')); echo "</div>"; echo "<div class='control-group'>"; echo $form->labelEx($model, 'nacimiento', array('class' => 'control-label')); echo "<div class='controls'>"; $this->widget('CJuiDateTimePicker', array( 'model' => $model, 'name' => get_class($model) . '[nacimiento]', 'language' => 'es', 'value' => $model->nacimiento?$model->nacimiento:null, 'mode' => 'date', 'options' => array( 'showAnim' => 'fold', // 'show' (the default), 'slideDown', 'fadeIn', 'fold'
/** * Lists all models. */ public function actionIndex() { $filtro = new PersonaFiltro(); if (isset($_GET['PersonaFiltro'])) { $filtro->attributes = $_GET['PersonaFiltro']; } $genero = Sexo::model()->findAll(array('select' => 'id, descripcion', 'order' => 'descripcion ASC')); $dataProvider = $filtro->search(); $this->render('index', array('dataProvider' => $dataProvider, 'filtros' => $filtro, 'genero' => $genero)); }