Unverified Commit 028d117e authored by José Fernando Mendes da Costa's avatar José Fernando Mendes da Costa Committed by GitHub
Browse files

Merge pull request #817 from jofernando/oldfuncao

Corrige função do participante quando ocorre erro na submissão
parents db8b854f b0445df3
......@@ -358,7 +358,7 @@
</div>
@endif
@if($edital->tipo != "CONTINUO")
@if($edital->tipo != "CONTINUO" && (old('funcaoParticipante') == null || !array_key_exists($i, old('funcaoParticipante')) || old('funcaoParticipante')[$i] == 'Bolsista'))
<div class="col-md-12" id="plano-titulo{{$i}}">
<h5>Plano de trabalho</h5>
</div>
......
......@@ -214,20 +214,9 @@
let planoTrabalho = document.getElementById("nomePlanoTrabalho"+id);
let cpf = document.getElementById("cpf"+id);
let funcao = document.getElementById("funcao_participante");
let funcao = document.getElementById("funcaoParticipante"+id);
let email = document.getElementById("email"+id);
let funcaoParticipantes = <?php echo json_encode($funcaoParticipantes); ?>;
let nome_funcao = get_funcao(funcao.value);
//pega o nome da função do participante
for (var i = 0; i < funcaoParticipantes.length; i++) {
if(funcaoParticipantes[i].id == funcao.value){
nome_funcao = funcaoParticipantes[i].nome;
break;
}
}
if(nome.value != ""){
if(planoTrabalho != null && planoTrabalho.value != ""){
nomePlano.innerHTML = ` <p style='font-weight: normal; line-height: normal;'><strong>Nome: </strong>${nome.value}<br>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment