Commit d36032ee authored by Guilherme Silva's avatar Guilherme Silva
Browse files

Ajuste no card de participantes no envio de proposta

parent 2b5258e1
<!-- Participantes --> <!-- Participantes -->
@php $cont= 0; @endphp
<div class="col-md-12" style="margin-top: 20px"> <div class="col-md-12" style="margin-top: 20px">
<div class="card" style="border-radius: 5px"> <div class="card" style="border-radius: 5px">
<div class="card-body" style="padding-top: 0.2rem;"> <div class="card-body" style="padding-top: 0.2rem;">
...@@ -17,7 +18,7 @@ ...@@ -17,7 +18,7 @@
<li id="item"> <li id="item">
<div style="margin-bottom:15px"> <div style="margin-bottom:15px">
<div id="participante" class="row"> <div id="participante" class="row">
@for($i = 0; $i < $edital->numParticipantes; $i++) @for($i = 0; $i < 5; $i++)
<div @if(!isset(old('marcado')[$i])) hidden @endif class="form-row mb-1 col-md-3" style="margin-top: 10px" id="part{{$i}}"> <div @if(!isset(old('marcado')[$i])) hidden @endif class="form-row mb-1 col-md-3" style="margin-top: 10px" id="part{{$i}}">
<div class="col-sm-4" style="display: flex; align-items: center;"> <div class="col-sm-4" style="display: flex; align-items: center;">
...@@ -25,7 +26,10 @@ ...@@ -25,7 +26,10 @@
</div> </div>
<div class="col-sm-8" style="display: flex; align-items: center;"> <div class="col-sm-8" style="display: flex; align-items: center;">
<a href="" style="" class="justify-content-center" data-toggle="modal" data-target="#exampleModal{{$i}}" id="nomePart{{$i+1}}"> <a href="" style="" class="justify-content-center" data-toggle="modal" data-target="#exampleModal{{$i}}" id="nomePart{{$i+1}}">
Discente {{$i+1}} @if(isset(old('marcado')[$i]))
@if(isset(old('name')[$i]))Nome: {{old('name')[$i]}} @else Discente {{$i+1}} @endif
@if(isset(old('nomePlanoTrabalho')[$i]))<br> Plano: {{old('nomePlanoTrabalho')[$i]}} @endif
@endif
</a> </a>
</div> </div>
</div> </div>
...@@ -363,7 +367,7 @@ ...@@ -363,7 +367,7 @@
</div> </div>
<div class="col-6"> <div class="col-6">
<button data-dismiss="modal" type="button" id="cancelar{{$i}}" class=" btn btn-danger" style="font-size: 16px" onclick="desmarcar({{$i}})">Cancelar</button> <button data-dismiss="modal" type="button" id="cancelar{{$i}}" class=" btn btn-danger" style="font-size: 16px" onclick="desmarcar({{$i}})" @if(isset(old('marcado')[$i+1])) disabled @endif>Cancelar</button>
</div> </div>
<div class="col-6"> <div class="col-6">
<button data-dismiss="modal" type="button" id="guardar{{$i}}" class="btn btn-success float-right" style="font-size: 16px" onclick="marcar({{$i}})">Salvar</button> <button data-dismiss="modal" type="button" id="guardar{{$i}}" class="btn btn-success float-right" style="font-size: 16px" onclick="marcar({{$i}})">Salvar</button>
......
...@@ -192,7 +192,6 @@ ...@@ -192,7 +192,6 @@
let linkNome = document.getElementById("nomePart"+(id+1)); let linkNome = document.getElementById("nomePart"+(id+1));
let linkTituloProj = document.getElementById("tituloProj"+(id+1)); let linkTituloProj = document.getElementById("tituloProj"+(id+1));
let planoTrabalho = document.getElementById("nomePlanoTrabalho"+id); let planoTrabalho = document.getElementById("nomePlanoTrabalho"+id);
if(nome.value != ""){ if(nome.value != ""){
if(planoTrabalho.value != ""){ if(planoTrabalho.value != ""){
linkNome.innerText = `Nome: ${nome.value} \n Plano: ${planoTrabalho.value}`; linkNome.innerText = `Nome: ${nome.value} \n Plano: ${planoTrabalho.value}`;
...@@ -200,6 +199,9 @@ ...@@ -200,6 +199,9 @@
linkNome.innerText = `Nome: ${nome.value}`; linkNome.innerText = `Nome: ${nome.value}`;
} }
} }
if(id >=1){
document.getElementById("cancelar"+(id-1)).setAttribute("disabled", true);
}
document.getElementById("checkB"+id).checked = true; document.getElementById("checkB"+id).checked = true;
$("#atribuir1").attr('data-target','#exampleModal'+(id+1)); $("#atribuir1").attr('data-target','#exampleModal'+(id+1));
...@@ -210,7 +212,9 @@ ...@@ -210,7 +212,9 @@
} }
function desmarcar(id){ function desmarcar(id){
document.getElementById("arquivoPlano"+id).setAttribute("hidden", true); if(id >= 1){;
document.getElementById("cancelar"+(id-1)).removeAttribute("disabled");
}
document.getElementById("checkB"+id).checked = false; document.getElementById("checkB"+id).checked = false;
document.getElementById("part"+id).setAttribute("hidden",true); document.getElementById("part"+id).setAttribute("hidden",true);
$("#atribuir1").attr('data-target','#exampleModal'+(id)); $("#atribuir1").attr('data-target','#exampleModal'+(id));
......
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