Commit df7843cb273851bfcaa5c9fc876c95e43ffa1086

Authored by Eriksen Costa Paixão
1 parent 9ab15c8e
Exists in master

Corrigido bug no select de estado na criação de logradouro, CEP e bairro

ieducar/intranet/public_bairro_cad.php
... ... @@ -23,6 +23,7 @@
23 23 * @author Prefeitura Municipal de Itajaí <ctima@itajai.sc.gov.br>
24 24 * @license http://creativecommons.org/licenses/GPL/2.0/legalcode.pt CC GNU GPL
25 25 * @package Core
  26 + * @subpackage public
26 27 * @subpackage Enderecamento
27 28 * @subpackage Bairro
28 29 * @since Arquivo disponível desde a versão 1.0.0
... ... @@ -261,7 +262,7 @@ document.getElementById(&#39;idpais&#39;).onchange = function() {
261 262  
262 263 function getUf(xml_uf) {
263 264 var campoUf = document.getElementById('sigla_uf');
264   - var DOM_array = xml_uf.getElementsByTagName('uf');
  265 + var DOM_array = xml_uf.getElementsByTagName('estado');
265 266  
266 267 if (DOM_array.length) {
267 268 campoUf.length = 1;
... ...
ieducar/intranet/public_logradouro_cad.php
... ... @@ -23,6 +23,7 @@
23 23 * @author Prefeitura Municipal de Itajaí <ctima@itajai.sc.gov.br>
24 24 * @license http://creativecommons.org/licenses/GPL/2.0/legalcode.pt CC GNU GPL
25 25 * @package Core
  26 + * @subpackage public
26 27 * @subpackage Enderecamento
27 28 * @subpackage Logradouro
28 29 * @since Arquivo disponível desde a versão 1.0.0
... ... @@ -286,7 +287,7 @@ document.getElementById(&#39;idpais&#39;).onchange = function() {
286 287  
287 288 function getUf(xml_uf) {
288 289 var campoUf = document.getElementById('sigla_uf');
289   - var DOM_array = xml_uf.getElementsByTagName('uf');
  290 + var DOM_array = xml_uf.getElementsByTagName('estado');
290 291  
291 292 if (DOM_array.length) {
292 293 campoUf.length = 1;
... ...
ieducar/intranet/urbano_cep_logradouro_cad.php
... ... @@ -222,39 +222,6 @@ class indice extends clsCadastro
222 222 function Novo()
223 223 {
224 224 $this->Editar();
225   - /*
226   - session_start();
227   - $this->pessoa_logada = $_SESSION['id_pessoa'];
228   - session_write_close();
229   -
230   - if (($this->idbai[0] != "") && ($this->cep[0] != "")) {
231   - foreach ($this->cep as $id => $cep) {
232   - $cep = idFederal2int($cep);
233   -
234   - $obj = new clsUrbanoCepLogradouro($cep, $this->idlog, NULL, NULL, NULL,
235   - NULL, 'U', $this->pessoa_logada, NULL, 'I', NULL, 9);
236   - if ($obj->cadastra()) {
237   - $obj_cep_log_bairro = new clsUrbanoCepLogradouroBairro($this->idlog,
238   - $cep, $this->idbai[$id], NULL, NULL, 'U', $this->pessoa_logada, NULL,
239   - 'I', NULL, 9);
240   -
241   - if (!$obj_cep_log_bairro->cadastra()) {
242   - $this->mensagem = 'Cadastro n&atilde;o realizado.<br>';
243   - echo '<!--\nErro ao editar clsUrbanoCepLogradouro\nvalores obrigatorios\nif( is_numeric( $cep ) && is_numeric( $this->idlog ) && is_numeric( {$this->idbai[$id]} ) && is_numeric( $this->pessoa_logada ) )\n-->';
244   - return FALSE;
245   - }
246   - }
247   - }
248   -
249   - $this->mensagem .= 'Edi&ccedil;&atilde;o efetuada com sucesso.<br>';
250   - header('Location: urbano_cep_logradouro_lst.php');
251   - die();
252   - }
253   - else {
254   - $this->mensagem = 'É necessario adicionar pelo menos um CEP e bairro.<br>';
255   - return FALSE;
256   - }
257   - */
258 225 }
259 226  
260 227 function Editar()
... ... @@ -356,12 +323,12 @@ document.getElementById(&#39;idpais&#39;).onchange = function() {
356 323  
357 324 function getUf(xml_uf) {
358 325 var campoUf = document.getElementById('sigla_uf');
359   - var DOM_array = xml_uf.getElementsByTagName('uf');
  326 + var DOM_array = xml_uf.getElementsByTagName('estado');
360 327  
361 328 if (DOM_array.length) {
362 329 campoUf.length = 1;
363 330 campoUf.options[0].text = 'Selecione um estado';
364   - campoUf.disabled = NULL;
  331 + campoUf.disabled = false;
365 332  
366 333 for (var i = 0; i < DOM_array.length; i++) {
367 334 campoUf.options[campoUf.options.length] = new Option( DOM_array[i].firstChild.data,
... ...