</h1> <?php $form = ActiveForm::begin(["method" => "post", 'enableClientValidation' => true]); ?> <?php echo $form->field($model, "id_usuario")->input("hidden")->label(false); ?> <?php echo $form->field($model, "NOMBRE_USUARIO")->input("text"); ?> <?php echo $form->field($model, "id_departamento")->dropDownList(ArrayHelper::Map(DepartamentoTabla::find()->all(), "ID_DEPARTAMENTO", "NOMBRE_DEPARTAMENTO"), ["prompt" => "Sin informar"]); ?> <?php echo $form->field($model, "id_rol")->dropDownList(ArrayHelper::Map(ROL::find()->all(), "ID_ROL", "ROL")); ?> <?php echo $form->field($model, "EMAIL")->input("email"); ?> <?php echo $form->field($model, "password")->input("password"); ?> <?php
public function actionViewdep() { PermisosController::permisoAdministrador(); $tabla = new DepartamentoTabla(); return $this->render("ViewDepartamentos", ["model" => $tabla->find()->all()]); }