"app/git@sites.upe.br:walter.felipe/submeta.git" did not exist on "5ac2f8727e27e510b3d2c49d5998924127192b9f"
Commit ba71da40 authored by alinetenorio's avatar alinetenorio
Browse files

deletar dados de participante - formulário

parent cee2e0a1
......@@ -96,8 +96,7 @@
</div>
<div class="col-sm-6">
<label for="nomeTrabalho" class="col-form-label">Link Lattes do Proponente</label>
<input class="form-control" type="text" name="linkLattesEstudante"
@if(Auth()->user()->proponentes->linkLattes != null)
<input class="form-control" type="text" name="linkLattesEstudante" @if(Auth()->user()->proponentes->linkLattes != null)
value="{{ Auth()->user()->proponentes->linkLattes }}"
@else
......@@ -121,14 +120,13 @@
{{-- Anexo do Projeto --}}
<div class="row justify-content-center">
{{-- Arquivo --}}
<div class="col-sm-6" >
<div class="col-sm-6">
<label for="anexoProjeto" class="col-form-label">{{ __('Anexo Projeto:') }}</label>
<div class="input-group">
<div class="custom-file">
<input type="file" class="custom-file-input" id="anexoProjeto"
aria-describedby="inputGroupFileAddon01" name="anexoProjeto">
<input type="file" class="custom-file-input" id="anexoProjeto" aria-describedby="inputGroupFileAddon01" name="anexoProjeto">
<label class="custom-file-label" id="custom-file-label" for="anexoProjeto">O arquivo deve ser no formato PDF de até 2mb.</label>
</div>
</div>
......@@ -139,14 +137,13 @@
@enderror
</div>
<div class="col-sm-6" >
<div class="col-sm-6">
<label for="anexoLatterCoordenador" class="col-form-label">{{ __('Anexo do Lattes do Coordenador:') }}</label>
<div class="input-group">
<div class="custom-file">
<input type="file" class="custom-file-input" id="inputGroupFile01"
aria-describedby="anexoLatterCoordenador" name="anexoLatterCoordenador">
<input type="file" class="custom-file-input" id="inputGroupFile01" aria-describedby="anexoLatterCoordenador" name="anexoLatterCoordenador">
<label class="custom-file-label" id="custom-file-label" for="inputGroupFile01">O arquivo deve ser no formato PDF de até 2mb.</label>
</div>
</div>
......@@ -161,7 +158,7 @@
<div class="col-sm-6" >
<div class="col-sm-6">
<label for="nomeTrabalho" class="col-form-label">{{ __('Possui autorização do Comitê de Ética:') }}</label>
<button id="buttonSim" class="btn btn-primary mt-2 mb-2">Sim</button>
<button id="buttonNao" class="btn btn-primary mt-2 mb-2">Não</button>
......@@ -169,8 +166,7 @@
<div class="custom-file">
<input type="file" class="custom-file-input" id="inputEtica"
aria-describedby="inputGroupFileAddon01" name="anexoComiteEtica">
<input type="file" class="custom-file-input" id="inputEtica" aria-describedby="inputGroupFileAddon01" name="anexoComiteEtica">
<label class="custom-file-label" id="custom-file-label" for="inputGroupFile01">O arquivo deve ser no formato PDF de até 2mb.</label>
</div>
</div>
......@@ -181,14 +177,13 @@
@enderror
</div>
<div class="col-sm-6 mt-3" >
<div class="col-sm-6 mt-3">
<label for="anexoPlanilha" class="col-form-label">{{ __('Anexo do Planilha de Pontuação :') }}</label>
<div class="input-group">
<div class="custom-file">
<input type="file" class="custom-file-input" id="anexoPlanilha"
aria-describedby="anexoPlanilhaDescribe" name="anexoPlanilha">
<input type="file" class="custom-file-input" id="anexoPlanilha" aria-describedby="anexoPlanilhaDescribe" name="anexoPlanilha">
<label class="custom-file-label" id="custom-file-label" for="anexoPlanilha">O arquivo deve ser no formato PDF de até 2mb.</label>
</div>
</div>
......@@ -199,15 +194,14 @@
@enderror
</div>
<div class="col-sm-6" >
<div class="col-sm-6">
<label for="nomeTrabalho" class="col-form-label">{{ __('Justificativa:') }}</label>
<div class="input-group">
<div class="custom-file">
<input type="file" class="custom-file-input" id="inputJustificativa"
aria-describedby="inputGroupFileAddon01" disabled="disabled" name="JustificativaAutorizacaoEtica">
<input type="file" class="custom-file-input" id="inputJustificativa" aria-describedby="inputGroupFileAddon01" disabled="disabled" name="JustificativaAutorizacaoEtica">
<label class="custom-file-label" id="custom-file-label" for="inputGroupFile01">O arquivo deve ser no formato PDF de até 2mb.</label>
</div>
</div>
......@@ -220,14 +214,13 @@
@if($edital->tipo == 'PIBIC' || $edital->tipo == 'PIBIC-EM')
{{-- Decisão do CONSU --}}
<div class="col-sm-6" >
<div class="col-sm-6">
<label for="anexoCONSU" class="col-form-label">{{ __('Decisão do CONSU:') }}</label>
<div class="input-group">
<div class="custom-file">
<input type="file" class="custom-file-input" id="anexoCONSU"
aria-describedby="inputGroupFileAddon01" name="anexoCONSU">
<input type="file" class="custom-file-input" id="anexoCONSU" aria-describedby="inputGroupFileAddon01" name="anexoCONSU">
<label class="custom-file-label" id="custom-file-label" for="inputGroupFile01">O arquivo deve ser no formato PDF de até 2mb.</label>
</div>
</div>
......@@ -248,7 +241,9 @@
<div class="row" style="margin-top:20px">
<div class="col-sm-12">
<div id="participantes">
<br><h5>Dados do participante</h5>
<div id="novoParticipante">
<br>
<h5>Dados do participante</h5>
<div class="row">
<div class="col-sm-5">
<label>Nome Completo</label>
......@@ -279,14 +274,13 @@
</div>
{{-- Arquivo --}}
<div class="col-sm-7">
<label for="nomeTrabalho" >Anexo</label>
<div class="input-group" >
<label for="nomeTrabalho">Anexo</label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text" id="anexoPlanoTrabalho">Selecione um arquivo:</span>
</div>
<div class="custom-file">
<input type="file" class="custom-file-input" id="anexoPlanoTrabalho"
aria-describedby="anexoPlanoTrabalho" name="anexoPlanoTrabalho[]">
<input type="file" class="custom-file-input" id="anexoPlanoTrabalho" aria-describedby="anexoPlanoTrabalho" name="anexoPlanoTrabalho[]">
<label class="custom-file-label" id="custom-file-label" for="inputGroupFile01">O arquivo deve ser no formato PDF de até 2mb.</label>
</div>
</div>
......@@ -306,6 +300,7 @@
</div>
</div>
</div>
</div>
<a href="#" class="btn btn-primary" id="addCoautor" style="width:100%;margin-top:10px">Participantes +</a>
</div>
</div>
......@@ -332,14 +327,12 @@
@section('javascript')
<script type="text/javascript">
$(function(){
$(function() {
var qtdLinhas = 1;
var qtdParticipantes = 2;
// Coautores
$('#addCoautor').click(function(e){
if(qtdParticipantes < 100){
$('#addCoautor').click(function(e) {
if (qtdParticipantes < 100) {
e.preventDefault();
linha = montarLinhaInput();
$('#participantes').append(linha);
......@@ -347,9 +340,9 @@ $(function(){
}
});
$('#addPlanoTrabalho').click(function(e){
$('#addPlanoTrabalho').click(function(e) {
e.preventDefault();
if(qtdLinhas < 4){
if (qtdLinhas < 4) {
linha = montarLinhaInputPlanoTrabalho();
$('#planoTrabalho').append(linha);
qtdLinhas++;
......@@ -357,37 +350,37 @@ $(function(){
});
// Exibir modalidade de acordo com a área
$("#area").change(function(){
$("#area").change(function() {
console.log($(this).val());
addModalidade($(this).val());
});
$(document).on('click','.delete',function(){
if(qtdParticipantes > 2){
$(document).on('click', '.delete', function() {
if (qtdParticipantes > 2) {
qtdParticipantes--;
$(this).closest('.row').remove();
$(this).closest('#novoParticipante').remove();
return false;
}
});
$(document).on('click','.deletePlano',function(){
if(qtdLinhas > 1){
$(document).on('click', '.deletePlano', function() {
if (qtdLinhas > 1) {
qtdLinhas--;
$("#planoTrabalho div.row:last").remove();
return false;
}
});
$('#anexoProjeto').on('change',function(){
$('#anexoProjeto').on('change', function() {
//get the file name
var fileName = $(this).val();
//replace the "Choose a file" label
$(this).next('#custom-file-label').html(fileName);
})
// F
$('#buttonSim').on('click',function(e){
$('#buttonSim').on('click', function(e) {
e.preventDefault();
$('#inputEtica').prop('disabled', false);
$('#inputJustificativa').prop('disabled', true);
});
$('#buttonNao').on('click',function(e){
$('#buttonNao').on('click', function(e) {
e.preventDefault();
$('#inputEtica').prop('disabled', true);
$('#inputJustificativa').prop('disabled', false);
......@@ -396,19 +389,21 @@ $(function(){
});
// Remover Coautor
function addModalidade(areaId){
function addModalidade(areaId) {
console.log(modalidades)
$("#modalidade").empty();
for(let i = 0; i < modalidades.length; i++){
if(modalidades[i].areaId == areaId){
for (let i = 0; i < modalidades.length; i++) {
if (modalidades[i].areaId == areaId) {
console.log(modalidades[i]);
$("#modalidade").append("<option value="+modalidades[i].modalidadeId+">"+modalidades[i].modalidadeNome+"</option>")
$("#modalidade").append("<option value=" + modalidades[i].modalidadeId + ">" + modalidades[i].modalidadeNome + "</option>")
}
}
}
function montarLinhaInput(){
return "<br><h5>Dados do participante</h5>" +
function montarLinhaInput() {
return "<div id="+"novoParticipante"+">" +
"<br><h5>Dados do participante</h5>" +
"<div class="+"row"+">"+
"<div class="+"col-sm-5"+">"+
"<label>Nome Completo</label>"+
......@@ -458,6 +453,7 @@ $(function(){
"<img src="+"/img/icons/user-times-solid.svg"+" style="+"width:25px;margin-top:35px"+">"+
"</a>"+
"</div>"+
"</div>"+
"</div>";
}
// function montarLinhaInputPlanoTrabalho(){
......@@ -493,6 +489,5 @@ $(function(){
// "</div>"+
// "</div>";
// }
</script>
@endsection
\ No newline at end of file
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