From df7843cb273851bfcaa5c9fc876c95e43ffa1086 Mon Sep 17 00:00:00 2001 From: Eriksen Costa Paixão Date: Thu, 30 Jul 2009 21:44:28 +0000 Subject: [PATCH] Corrigido bug no select de estado na criação de logradouro, CEP e bairro --- ieducar/intranet/public_bairro_cad.php | 3 ++- ieducar/intranet/public_logradouro_cad.php | 3 ++- ieducar/intranet/urbano_cep_logradouro_cad.php | 37 ++----------------------------------- 3 files changed, 6 insertions(+), 37 deletions(-) diff --git a/ieducar/intranet/public_bairro_cad.php b/ieducar/intranet/public_bairro_cad.php index 5a815ec..bec8bf4 100755 --- a/ieducar/intranet/public_bairro_cad.php +++ b/ieducar/intranet/public_bairro_cad.php @@ -23,6 +23,7 @@ * @author Prefeitura Municipal de Itajaí * @license http://creativecommons.org/licenses/GPL/2.0/legalcode.pt CC GNU GPL * @package Core + * @subpackage public * @subpackage Enderecamento * @subpackage Bairro * @since Arquivo disponível desde a versão 1.0.0 @@ -261,7 +262,7 @@ document.getElementById('idpais').onchange = function() { function getUf(xml_uf) { var campoUf = document.getElementById('sigla_uf'); - var DOM_array = xml_uf.getElementsByTagName('uf'); + var DOM_array = xml_uf.getElementsByTagName('estado'); if (DOM_array.length) { campoUf.length = 1; diff --git a/ieducar/intranet/public_logradouro_cad.php b/ieducar/intranet/public_logradouro_cad.php index bda1ed3..e1a0f6c 100755 --- a/ieducar/intranet/public_logradouro_cad.php +++ b/ieducar/intranet/public_logradouro_cad.php @@ -23,6 +23,7 @@ * @author Prefeitura Municipal de Itajaí * @license http://creativecommons.org/licenses/GPL/2.0/legalcode.pt CC GNU GPL * @package Core + * @subpackage public * @subpackage Enderecamento * @subpackage Logradouro * @since Arquivo disponível desde a versão 1.0.0 @@ -286,7 +287,7 @@ document.getElementById('idpais').onchange = function() { function getUf(xml_uf) { var campoUf = document.getElementById('sigla_uf'); - var DOM_array = xml_uf.getElementsByTagName('uf'); + var DOM_array = xml_uf.getElementsByTagName('estado'); if (DOM_array.length) { campoUf.length = 1; diff --git a/ieducar/intranet/urbano_cep_logradouro_cad.php b/ieducar/intranet/urbano_cep_logradouro_cad.php index 03706a4..b5c074b 100755 --- a/ieducar/intranet/urbano_cep_logradouro_cad.php +++ b/ieducar/intranet/urbano_cep_logradouro_cad.php @@ -222,39 +222,6 @@ class indice extends clsCadastro function Novo() { $this->Editar(); - /* - session_start(); - $this->pessoa_logada = $_SESSION['id_pessoa']; - session_write_close(); - - if (($this->idbai[0] != "") && ($this->cep[0] != "")) { - foreach ($this->cep as $id => $cep) { - $cep = idFederal2int($cep); - - $obj = new clsUrbanoCepLogradouro($cep, $this->idlog, NULL, NULL, NULL, - NULL, 'U', $this->pessoa_logada, NULL, 'I', NULL, 9); - if ($obj->cadastra()) { - $obj_cep_log_bairro = new clsUrbanoCepLogradouroBairro($this->idlog, - $cep, $this->idbai[$id], NULL, NULL, 'U', $this->pessoa_logada, NULL, - 'I', NULL, 9); - - if (!$obj_cep_log_bairro->cadastra()) { - $this->mensagem = 'Cadastro não realizado.
'; - echo ''; - return FALSE; - } - } - } - - $this->mensagem .= 'Edição efetuada com sucesso.
'; - header('Location: urbano_cep_logradouro_lst.php'); - die(); - } - else { - $this->mensagem = 'É necessario adicionar pelo menos um CEP e bairro.
'; - return FALSE; - } - */ } function Editar() @@ -356,12 +323,12 @@ document.getElementById('idpais').onchange = function() { function getUf(xml_uf) { var campoUf = document.getElementById('sigla_uf'); - var DOM_array = xml_uf.getElementsByTagName('uf'); + var DOM_array = xml_uf.getElementsByTagName('estado'); if (DOM_array.length) { campoUf.length = 1; campoUf.options[0].text = 'Selecione um estado'; - campoUf.disabled = NULL; + campoUf.disabled = false; for (var i = 0; i < DOM_array.length; i++) { campoUf.options[campoUf.options.length] = new Option( DOM_array[i].firstChild.data, -- libgit2 0.21.2