Commit f1fb556ed9304aaebb02e7cf6086d893cf8b3314
1 parent
7e56095a
Exists in
master
by Eriksen: Corrigido bug que não listava os tipos de clientes para determinada biblioteca
Showing
1 changed file
with
16 additions
and
8 deletions
Show diff stats
ieducar/intranet/include/pmieducar/educar_campo_lista.php
| ... | ... | @@ -71,7 +71,7 @@ |
| 71 | 71 | $obj_permissoes = new clsPermissoes(); |
| 72 | 72 | $nivel_usuario = $obj_permissoes->nivel_acesso($pessoa_logada); |
| 73 | 73 | |
| 74 | - //Se administrador | |
| 74 | + //Se administrador | |
| 75 | 75 | if( $nivel_usuario == 1 || $cad_usuario ) |
| 76 | 76 | { |
| 77 | 77 | $opcoes = array( "" => "Selecione" ); |
| ... | ... | @@ -176,7 +176,7 @@ |
| 176 | 176 | { |
| 177 | 177 | $this->campoLista( "ref_cod_escola", "Escola", $opcoes_escola, $this->ref_cod_escola,null,null,null,null,$escola_desabilitado,$escola_obrigatorio ); |
| 178 | 178 | } |
| 179 | - } | |
| 179 | + } | |
| 180 | 180 | if ($get_curso) |
| 181 | 181 | { |
| 182 | 182 | $opcoes_curso = array( "" => "Selecione" ); |
| ... | ... | @@ -217,8 +217,8 @@ |
| 217 | 217 | |
| 218 | 218 | } |
| 219 | 219 | $this->campoLista( "ref_cod_curso", "Curso", $opcoes_curso, $this->ref_cod_curso,null,null,null,null,$curso_desabilitado,$curso_obrigatorio ); |
| 220 | - | |
| 221 | - if ($get_semestre) | |
| 220 | + | |
| 221 | + if ($get_semestre) | |
| 222 | 222 | { |
| 223 | 223 | $this->campoRotulo("semestres", "Semestre", "<div id='div_semestre'>Selecione um Curso</div>"); |
| 224 | 224 | $this->campoOculto("is_padrao", 1); |
| ... | ... | @@ -295,7 +295,11 @@ |
| 295 | 295 | $opcoes_biblioteca["{$biblioteca["ref_cod_biblioteca"]}"] = "{$det_biblioteca['nm_biblioteca']}"; |
| 296 | 296 | } |
| 297 | 297 | } |
| 298 | - $this->campoLista( "ref_cod_biblioteca", "Biblioteca", $opcoes_biblioteca, $this->ref_cod_biblioteca,null,null,null,null,$biblioteca_desabilitado,$biblioteca_obrigatorio ); | |
| 298 | + $getCliente = ''; | |
| 299 | + if ($get_cliente_tipo) { | |
| 300 | + $getCliente = "getClienteTipo()"; | |
| 301 | + } | |
| 302 | + $this->campoLista( "ref_cod_biblioteca", "Biblioteca", $opcoes_biblioteca, $this->ref_cod_biblioteca,$getCliente,null,null,null,$biblioteca_desabilitado,$biblioteca_obrigatorio ); | |
| 299 | 303 | } |
| 300 | 304 | else |
| 301 | 305 | { |
| ... | ... | @@ -315,7 +319,11 @@ |
| 315 | 319 | } |
| 316 | 320 | } |
| 317 | 321 | } |
| 318 | - $this->campoLista( "ref_cod_biblioteca", "Biblioteca", $opcoes_biblioteca, $this->ref_cod_biblioteca,null,null,null,null,$biblioteca_desabilitado,$biblioteca_obrigatorio ); | |
| 322 | + $getCliente = ''; | |
| 323 | + if ($get_cliente_tipo) { | |
| 324 | + $getCliente = "getClienteTipo()"; | |
| 325 | + } | |
| 326 | + $this->campoLista( "ref_cod_biblioteca", "Biblioteca", $opcoes_biblioteca, $this->ref_cod_biblioteca,$getCliente,null,null,null,$biblioteca_desabilitado,$biblioteca_obrigatorio ); | |
| 319 | 327 | } |
| 320 | 328 | } |
| 321 | 329 | |
| ... | ... | @@ -390,7 +398,7 @@ |
| 390 | 398 | ?> |
| 391 | 399 | <script type='text/javascript'> |
| 392 | 400 | <? |
| 393 | -// administrador institucional = cpd | |
| 401 | +// administrador institucional = cpd | |
| 394 | 402 | if ( $nivel_usuario == 1 || $nivel_usuario == 2 || $cad_usuario ) |
| 395 | 403 | { |
| 396 | 404 | ?> |
| ... | ... | @@ -1090,7 +1098,7 @@ function limpaCampos(nivel) |
| 1090 | 1098 | <? |
| 1091 | 1099 | if ($get_semestre) |
| 1092 | 1100 | {?> |
| 1093 | - | |
| 1101 | + | |
| 1094 | 1102 | function verifica_curso() |
| 1095 | 1103 | { |
| 1096 | 1104 | var ref_cod_curso = document.getElementById('ref_cod_curso').value; | ... | ... |