?> <div class="form form-inline span12" style="float:none;margin:auto"> <?php echo $form->errorSummary($model, NULL, NUll, array('class' => 'alert')); ?> <div class='row'> <div class='span5 white-box' style="text-align:right"> <h3>Información básica</h3> <p class="note">Los campos con <span class="required">*</span> son requeridos.</p> <div class="row"> <?php echo $form->labelEx($model, 'TipUsrId'); ?> <?php echo $form->dropDownList($model, 'TipUsrId', CHtml::listData(Tipusr::model()->findAll('tipUsrId<>1'), 'tipUsrId', 'tipUsrIdDes'), array('empty' => '---')); ?> <?php echo $form->error($model, 'TipUsrId'); ?> </div> <div class="row"> <?php echo $form->labelEx($model, 'UsuariosNom'); ?> <?php echo $form->textField($model, 'UsuariosNom'); ?> <?php
public function getTipo() { $tipo = Tipusr::model()->findByPk($this->TipUsrId); if (is_object($tipo)) { return $tipo->tipUsrIdDes; } else { return 'Sin tipo'; } }