From 85bc1847a1de1e4bf49892ca63f050107c240398 Mon Sep 17 00:00:00 2001 From: rmontanana Date: Tue, 18 Feb 2014 13:28:43 +0100 Subject: [PATCH] =?UTF-8?q?Corregido=20un=20problema=20con=20las=20longitu?= =?UTF-8?q?des=20m=C3=A1ximas=20de=20los=20campos=20en=20el=20formulario?= =?UTF-8?q?=20de=20entrada=20que=20no=20las=20admit=C3=ADa=20bien.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Mantenimiento.php | 8 ++------ xml/mantenimientoUsuarios.xml | 6 +++--- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/Mantenimiento.php b/Mantenimiento.php index 8d342df..cc5a558 100644 --- a/Mantenimiento.php +++ b/Mantenimiento.php @@ -353,10 +353,6 @@ class Mantenimiento { return $salida; } - /** - * @todo Hay que hacer lo de las búsquedas automatizadas. Buscar el comment de buscar. - * @todo Hay que hacer lo de las ordenaciones automatizadas. Buscar el comment de ordenable. - */ private function obtenerCampos() { //Si hay un fichero de descripción xml lo utiliza. $nombre = "xml/mantenimiento" . $this->tabla . ".xml"; @@ -364,7 +360,7 @@ class Mantenimiento { $def = simplexml_load_file($nombre); foreach ($def->Campos->Col as $columna) { $this->campos[(string) $columna['Nombre']] = array("Field" => (string) $columna['Titulo'], "Comment" => (string) $columna['Varios'], - "Type" => (string) $columna['Tipo'], "Editable" => (string) $columna['Editable'], "Campo" => (string) $columna['Campo']); + "Type" => (string) $columna['Tipo']."(".$columna['Ancho'].")", "Editable" => (string) $columna['Editable'], "Campo" => (string) $columna['Campo']); } $this->comandoConsulta = $def->Consulta; } else { @@ -447,7 +443,7 @@ class Mantenimiento { $tipo_campo = "text"; //Si no es una clave foránea añade un campo de texto normal $salida.='

\n"; + '" maxlength="' . $tamano . '" size="' . (string) (intval($tamano)+5) . '" ' . $modoEfectivo . " >

\n"; } else { $salida.=$this->generaLista($this->foraneas[$campo], $campo, $valorDato, $modoEfectivo); } diff --git a/xml/mantenimientoUsuarios.xml b/xml/mantenimientoUsuarios.xml index a4de3b9..c57635c 100644 --- a/xml/mantenimientoUsuarios.xml +++ b/xml/mantenimientoUsuarios.xml @@ -7,9 +7,9 @@ - - - + + +