Commit 6185c0f541005875c329a648bca1980c2f572304
Committed by
Caroline Salib
1 parent
5cb69fa4
Exists in
master
Corrigido bug ao selecionar pessoa cadastrada pela modal;
portabilis/ieducar#155
Showing
1 changed file
with
3 additions
and
7 deletions
Show diff stats
ieducar/modules/Cadastro/Assets/Javascripts/Aluno.js
| ... | ... | @@ -615,10 +615,6 @@ function afterChangePessoa(targetWindow, parentType, parentId, parentName) { |
| 615 | 615 | var $tempIdField; |
| 616 | 616 | var $tempNomeField; |
| 617 | 617 | |
| 618 | - console.log(parentType); | |
| 619 | - console.log(parentId); | |
| 620 | - console.log(parentName); | |
| 621 | - | |
| 622 | 618 | if(parentType){ |
| 623 | 619 | $tempIdField = $j(buildId(parentType + '_id')); |
| 624 | 620 | $tempNomeField = $j(buildId(parentType + '_nome')); |
| ... | ... | @@ -634,7 +630,7 @@ function afterChangePessoa(targetWindow, parentType, parentId, parentName) { |
| 634 | 630 | |
| 635 | 631 | $tempIdField.val(parentId); |
| 636 | 632 | if(!parentType){ |
| 637 | - getPersonDetails(pessoaId); | |
| 633 | + getPersonDetails(parentId); | |
| 638 | 634 | }else{ |
| 639 | 635 | $tempNomeField.val(parentId + ' - ' +parentName); |
| 640 | 636 | } |
| ... | ... | @@ -1294,14 +1290,14 @@ function canShowParentsFields(){ |
| 1294 | 1290 | dataType : 'json', |
| 1295 | 1291 | data : data, |
| 1296 | 1292 | success : function(dataResponse) { |
| 1297 | - afterChangePessoa(null,pessoa_id); | |
| 1293 | + afterChangePessoa(null,null,pessoa_id); | |
| 1298 | 1294 | } |
| 1299 | 1295 | }; |
| 1300 | 1296 | |
| 1301 | 1297 | postResource(options); |
| 1302 | 1298 | |
| 1303 | 1299 | }else{ |
| 1304 | - afterChangePessoa(null,pessoa_id); | |
| 1300 | + afterChangePessoa(null,null,pessoa_id); | |
| 1305 | 1301 | } |
| 1306 | 1302 | |
| 1307 | 1303 | } | ... | ... |