Commit 7025921d40f0521057bfbb1dfce6d77fbf244587
1 parent
5812bfac
Exists in
master
Criado parâmetro para obrigar endereçamento normalizado
portabilis/ieducar#50
Showing
3 changed files
with
28 additions
and
22 deletions
Show diff stats
ieducar/configuration/ieducar.ini
... | ... | @@ -151,6 +151,9 @@ app.recaptcha.options.theme = white |
151 | 151 | ; esta configuracao permite desativar este comportamento. |
152 | 152 | ;app.regras_negocio.desativar_rematricula_automatica = true |
153 | 153 | |
154 | +; Ativa obrigatoriedade de utilização de endereço normalizado no cadastro de pessoas | |
155 | +app.obriga_endereco_normalizado_pf = true | |
156 | + | |
154 | 157 | [development : production] |
155 | 158 | ; Herda configurações de banco de dados |
156 | 159 | ... | ... |
ieducar/intranet/atendidos_cad.php
... | ... | @@ -622,7 +622,7 @@ class indice extends clsCadastro |
622 | 622 | // considera como endereço localizado por CEP quando alguma das variaveis de instancia |
623 | 623 | // idbai (bairro) ou idlog (logradouro) estão definidas, neste caso desabilita a edição |
624 | 624 | // dos campos definidos via CEP. |
625 | - $desativarCamposDefinidosViaCep = ($this->idbai || $this->idlog); | |
625 | + $desativarCamposDefinidosViaCep = ((bool)$coreExt['Config']->app->obriga_endereco_normalizado_pf) || ($this->idbai || $this->idlog); | |
626 | 626 | |
627 | 627 | $this->campoCep( |
628 | 628 | 'cep_', | ... | ... |
ieducar/intranet/educar_pesquisa_cep_log_bairro.php
... | ... | @@ -215,27 +215,30 @@ class miolo1 extends clsListagem |
215 | 215 | $this->addPaginador2('educar_pesquisa_cep_log_bairro.php', $total, $_GET, |
216 | 216 | $this->nome, $limite); |
217 | 217 | |
218 | - if ($_GET['param']) { | |
219 | - $this->rodape = ' | |
220 | - <table border="0" cellspacing="0" cellpadding="0" width="100%" align="center"> | |
221 | - <tr width="100%"> | |
222 | - <td> | |
223 | - <div align="center">[ <a href="javascript:void(0);" onclick="liberaCamposOuvidoria()">Cadastrar Novo Endereço</a> ]</div> | |
224 | - </td> | |
225 | - </tr> | |
226 | - </table>'; | |
227 | - } | |
228 | - else { | |
229 | - $this->rodape = sprintf(' | |
230 | - <table border="0" cellspacing="0" cellpadding="0" width="100%%" align="center"> | |
231 | - <tr width="100%%"> | |
232 | - <td> | |
233 | - <div align="center">[ <a href="javascript:void(0);" onclick="%s">Cadastrar Novo Endereço</a> ]</div> | |
234 | - </td> | |
235 | - </tr> | |
236 | - </table>', | |
237 | - $this->funcao_js | |
238 | - ); | |
218 | + if(!((bool)$coreExt['Config']->app->obriga_endereco_normalizado_pf)){ | |
219 | + | |
220 | + if ($_GET['param']) { | |
221 | + $this->rodape = ' | |
222 | + <table border="0" cellspacing="0" cellpadding="0" width="100%" align="center"> | |
223 | + <tr width="100%"> | |
224 | + <td> | |
225 | + <div align="center">[ <a href="javascript:void(0);" onclick="liberaCamposOuvidoria()">Cadastrar Novo Endereço</a> ]</div> | |
226 | + </td> | |
227 | + </tr> | |
228 | + </table>'; | |
229 | + } | |
230 | + else { | |
231 | + $this->rodape = sprintf(' | |
232 | + <table border="0" cellspacing="0" cellpadding="0" width="100%%" align="center"> | |
233 | + <tr width="100%%"> | |
234 | + <td> | |
235 | + <div align="center">[ <a href="javascript:void(0);" onclick="%s">Cadastrar Novo Endereço</a> ]</div> | |
236 | + </td> | |
237 | + </tr> | |
238 | + </table>', | |
239 | + $this->funcao_js | |
240 | + ); | |
241 | + } | |
239 | 242 | } |
240 | 243 | |
241 | 244 | @session_write_close(); | ... | ... |