public function executeShow() { $this->labels = $this->getLabels(); $this->tabla = TablaPeer::retrieveByPk($this->getRequestParameter('id_tabla')); $this->forward404Unless($this->tabla); }
<div id="sf_admin_container"> <h1> <?php if (!isset($id_tabla)) { $id_tabla = null; } $tabla = TablaPeer::retrieveByPk($id_tabla); ?> <?php echo __('Editar modelo de campos', array()); ?> <?php if (isset($tabla)) { ?> de la tabla "<?php echo $tabla->getNombre(); ?> "<?php } ?> </h1> <div id="sf_admin_header"> </div> <div id="sf_admin_content"> <?php if (!sizeof($campos)) { ?> <blockquote class="warning"><p>
form-error<?php } ?> "> <?php if ($sf_request->hasError('campo{valor_defecto}')) { ?> <?php echo form_error('campo{valor_defecto}', array('class' => 'form-error-msg')); ?> <?php } ?> <?php //Obtener el campo de la tabla que es el nombre $mitabla = TablaPeer::retrieveByPk($campo->getValorTabla()); if ($mitabla != null) { //$formularios = $mitabla->getFormularios(FormularioPeer::getCriterioAlcance()); //$value = select_tag("campo[defecto_tabla]" , objects_for_select($formularios , 'getPrimaryKey' , '__toString' , $campo->getDefecto(), array('include_blank' => true)) , //array('control_name' => "campo[defecto_tabla]")); if ($campo->getDefecto() != 0) { $formulario_t = FormularioPeer::retrieveByPk($campo->getDefecto()); } else { $formulario_t = new Formulario(); } $value = popUp("campo[defecto_tabla]", $formulario_t, $mitabla->getIdEmpresa(), $campo->getValorTabla()); } echo $value ? $value : ' '; ?> <div class="sf_edit_help"><?php echo __('Indique el valor por defecto del campo');