"app/git@sites.upe.br:walter.felipe/submeta.git" did not exist on "1b9d6342e272ff81fac412763ce96e8c09096a03"
Commit 8de6a88e authored by Danillo Bion's avatar Danillo Bion
Browse files

modificacoes na tela - criar projeto

parent c82a821c
@extends('layouts.app')
@section('content')
<div class="container content">
<div class="row justify-content-center">
<div class="col-sm-10">
<div class="card" style="margin-top:50px; border-radius:12px">
<div class="card-header" style="background-color: #fff; border-top-left-radius:12px; border-top-right-radius:12px; border-bottom-radius:0px; margin-bottom:-2.5rem; border: none;">
<h4 style="margin-top: 10px; margin-bottom:-5px; color: #01487E; font-weight:bold; font-family:Arial, Helvetica, sans-serif">CRIAR PROJETO</h4>
<hr style="border-bottom: 1px solid #01487E">
</div>
<div class="card-body" style="margin-top:0rem">
<h5 class="card-title" style="color: #1492E6; margin-top:1rem; margin-bottom:-1rem">Informações do projeto</h5>
<p class="card-text">
<form method="POST" name="formTrabalho" action="{{route('trabalho.store')}}" enctype="multipart/form-data">
@csrf
<input type="hidden" name="editalId" value="{{$edital->id}}">
{{-- Nome do Projeto --}}
<div class="row justify-content-center">
<div class="col-sm-12">
<label for="nomeProjeto" class="col-form-label">{{ __('Nome do Projeto') }} <span style="color: red; font-weight:bold">*</span></label>
<input id="nomeProjeto" type="text" class="form-control @error('nomeProjeto') is-invalid @enderror" name="nomeProjeto" placeholder="Digite o nome do projeto" value="{{ old('nomeProjeto') !== null ? old('nomeProjeto') : (isset($rascunho) ? $rascunho->titulo : '')}}" autocomplete="nomeProjeto" autofocus required>
<div>
<form method="POST" id="criarProjetoForm" action="{{route('trabalho.store')}}" enctype="multipart/form-data">
@csrf
<input type="hidden" name="editalId" value="{{$edital->id}}">
@error('nomeProjeto')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
<div class="container">
<div class="row justify-content-center">
<!-- projeto -->
<div class="col-md-10" style="text-align: center; margin-top:2rem"><h4 style="margin-top: 1rem;">1º Passo</h4></div>
<div class="col-md-10" style="text-align: center;"><h5 style="margin-bottom:1rem;color:#909090">Preencha os campos com as informações do projeto</h5></div>
<div class="col-md-10">
<div class="card" style="border-radius: 12px">
<div class="card-body">
<div class="container">
<div class="form-row mt-3">
<div class="col-md-12"><h5 style="color: #1492E6; margin-bottom:-0.4rem">Informações do projeto</h5></div>
<div class="col-md-12" style="margin-bottom: -0.8rem;"><hr style="border-top: 1px solid#1492E6"></div>
<div class="form-group col-md-12" style="margin-top: 10px">
<label for="nomeProjeto" class="col-form-label">{{ __('Nome do Projeto') }} <span style="color: red; font-weight:bold">*</span></label>
<input id="nomeProjeto" type="text" class="form-control @error('nomeProjeto') is-invalid @enderror" name="nomeProjeto" placeholder="Digite o nome do projeto" value="{{ old('nomeProjeto') !== null ? old('nomeProjeto') : (isset($rascunho) ? $rascunho->titulo : '')}}" autocomplete="nomeProjeto" autofocus required>
@error('nomeProjeto')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div>
{{-- Grande Area --}}
<div class="row justify-content-center">
<div class="col-sm-4">
<div class="form-group col-md-4">
<label for="grandeArea" class="col-form-label">{{ __('Grande Área') }} <span style="color: red; font-weight:bold">*</span></label>
<select class="form-control @error('grandeArea') is-invalid @enderror" id="grandeArea" name="grandeArea" onchange="areas()" required>
<option value="" disabled selected hidden>-- Grande Área --</option>
@foreach($grandeAreas as $grandeArea)
<option @if(old('grandeArea') !== null ? old('grandeArea') : (isset($rascunho) ? $rascunho->grande_area_id : '')
== $grandeArea->id ) selected @endif value="{{$grandeArea->id}}">{{$grandeArea->nome}}</option>
@endforeach
</select>
@error('grandeArea')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
<select class="form-control @error('grandeArea') is-invalid @enderror" id="grandeArea" name="grandeArea" onchange="areas()" required>
<option value="" disabled selected hidden>-- Grande Área --</option>
@foreach($grandeAreas as $grandeArea)
<option @if(old('grandeArea') !== null ? old('grandeArea') : (isset($rascunho) ? $rascunho->grande_area_id : '')
== $grandeArea->id ) selected @endif value="{{$grandeArea->id}}">{{$grandeArea->nome}}</option>
@endforeach
</select>
@error('grandeArea')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="col-sm-4">
<div class="form-group col-md-4">
<label for="area" class="col-form-label">{{ __('Área') }} <span style="color: red; font-weight:bold">*</span></label>
<input type="hidden" id="oldArea" value="{{ old('area') }}">
<select class="form-control @error('area') is-invalid @enderror" id="area" name="area" onchange="subareas()" required>
<option value="" disabled selected hidden>-- Área --</option>
{{-- @foreach($areas as $area)
<option @if(old('area') !== null ? old('area') : (isset($rascunho) ? $rascunho->area_id : '')
==$area->id ) selected @endif value="{{$area->id}}">{{$area->nome}}</option>
@endforeach --}}
</select>
@error('area')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
<input type="hidden" id="oldArea" value="{{ old('area') }}">
<select class="form-control @error('area') is-invalid @enderror" id="area" name="area" onchange="subareas()" required>
<option value="" disabled selected hidden>-- Área --</option>
</select>
@error('area')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="col-sm-4">
<div class="form-group col-md-4">
<label for="subArea" class="col-form-label">{{ __('Subárea') }} <span style="color: red; font-weight:bold">*</span></label>
<input type="hidden" id="oldSubArea" value="{{ old('subArea') }}">
<select class="form-control @error('subArea') is-invalid @enderror" id="subArea" name="subArea" required>
<option value="" disabled selected hidden>-- Subárea --</option>
{{-- @foreach($subAreas as $subArea)
<option @if(old('subArea') !== null ? old('subArea') : (isset($rascunho) ? $rascunho->sub_area_id : '')
==$subArea->id ) selected @endif value="{{$subArea->id}}">{{$subArea->nome}}</option>
@endforeach --}}
</select>
@error('subArea')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
<input type="hidden" id="oldSubArea" value="{{ old('subArea') }}">
<select class="form-control @error('subArea') is-invalid @enderror" id="subArea" name="subArea" required>
<option value="" disabled selected hidden>-- Subárea --</option>
{{-- @foreach($subAreas as $subArea)
<option @if(old('subArea') !== null ? old('subArea') : (isset($rascunho) ? $rascunho->sub_area_id : '')
==$subArea->id ) selected @endif value="{{$subArea->id}}">{{$subArea->nome}}</option>
@endforeach --}}
</select>
@error('subArea')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div>
<h5 class="card-title" style="color: #1492E6; margin-top:1rem; margin-bottom:-0.1rem">Proponente</h5>
{{-- Coordenador --}}
<div class="row justify-content-center">
<div class="col-sm-6">
<label for="nomeCoordenador" class="col-form-label">{{ __('Proponente') }}</label>
</div>
</div>
</div>
</div>
<!--X projeto X-->
<!-- Proponente -->
<div class="col-md-10" style="text-align: center; margin-top:2rem"><h4 style="margin-top: 1rem;">2º Passo</h4></div>
<div class="col-md-10" style="text-align: center;"><h5 style="margin-bottom:1rem;color:#909090">Preencha os campos com as informações do proponente</h5></div>
<div class="col-md-10">
<div class="card" style="border-radius: 12px">
<div class="card-body">
<div class="container">
<div class="form-row mt-3">
<div class="col-md-12"><h5 style="color: #1492E6; margin-bottom:-0.4rem">Informações do proponente</h5></div>
<div class="col-md-12" style="margin-bottom: -0.8rem;"><hr style="border-top: 1px solid#1492E6"></div>
<div class="form-group col-md-12" style="margin-top: 15px">
<label for="nomeCompletoParticipante1">Proponente</label>
<input class="form-control" type="text" id="nomeCoordenador" name="nomeCoordenador" disabled="disabled" value="{{ Auth()->user()->name }}">
</div>
<div class="col-sm-6">
<label for="linkLattesEstudante" class="col-form-label">Link Lattes do Proponente <span style="color: red; font-weight:bold">*</span></label>
<input class="form-control @error('linkLattesEstudante') is-invalid @enderror" type="text" name="linkLattesEstudante"
<div class="form-group col-md-4">
<label for="linkLattesEstudante">Link do currículo Lattes<span style="color: red; font-weight:bold">*</span></label>
<input class="form-control @error('linkLattesEstudante') is-invalid @enderror" type="text" name="linkLattesEstudante" required
@if(Auth()->user()->proponentes != null && Auth()->user()->proponentes->linkLattes != null)
value="{{ Auth()->user()->proponentes->linkLattes }}"
@else
value=""
@endif required>
<small>Exemplo: http://lattes.cnpq.br/8363536830656923</small>
<small>Ex.: http://lattes.cnpq.br/8363536830656923</small>
@error('linkLattesEstudante')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="col-sm-6 mt-1">
<label for="pontuacaoPlanilha" class="col-form-label">{{ __('Pontuação da Planilha de Pontuação') }} <span style="color: red; font-weight:bold">*</span></label>
<div class="form-group col-md-4">
<label for="pontuacaoPlanilha">Pontuação da planilha de pontuação <span style="color: red; font-weight:bold">*</span></label>
<input class="form-control @error('pontuacaoPlanilha') is-invalid @enderror" type="text" name="pontuacaoPlanilha"
value="{{old('pontuacaoPlanilha') !== null ? old('pontuacaoPlanilha') : (isset($rascunho) ? $rascunho->pontuacaoPlanilha : '')}}" required>
......@@ -120,34 +125,44 @@
</span>
@enderror
</div>
<div class="col-sm-6">
<label for="linkGrupo" class="col-form-label">{{ __('Link do grupo de pesquisa') }} <span style="color: red; font-weight:bold">*</span></label>
<div class="form-group col-md-4">
<label for="linkGrupo">Link do grupo de pesquisa</label>
<input class="form-control @error('linkGrupo') is-invalid @enderror" type="text" name="linkGrupo"
value="{{old('linkGrupo') !== null ? old('linkGrupo') : (isset($rascunho) ? $rascunho->linkGrupoPesquisa : '')}}" required>
value="{{old('linkGrupo') !== null ? old('linkGrupo') : (isset($rascunho) ? $rascunho->linkGrupoPesquisa : '')}}">
<small>Exemplo: http://dgp.cnpq.br/dgp/espelhogrupo/228363</small>
<small>Ex.: http://dgp.cnpq.br/dgp/espelhogrupo/228363</small>
@error('linkGrupo')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div>
<h5 class="card-title" style="color: #1492E6; margin-top:15px; margin-bottom:-0.1rem">Anexos</h5>
{{-- Anexo do Projeto --}}
<div class="row justify-content-center">
{{-- Arquivo --}}
<div class="col-sm-6">
</div>
</div>
</div>
</div>
<!--X Proponente X-->
<!-- Anexos -->
<div class="col-md-10" style="text-align: center; margin-top:2rem"><h4 style="margin-top: 1rem;">3º Passo</h4></div>
<div class="col-md-10" style="text-align: center;"><h5 style="margin-bottom:1rem;color:#909090">Anexos</h5></div>
<div class="col-md-10">
<div class="card" style="border-radius: 12px">
<div class="card-body">
<div class="container">
<div class="form-row mt-3">
<div class="col-md-12"><h5 style="color: #1492E6; margin-bottom:-0.4rem">Anexos</h5></div>
<div class="col-md-12" style="margin-bottom: -0.8rem;"><hr style="border-top: 1px solid#1492E6"></div>
<div class="form-group col-md-6" style="margin-top: 10px">
<label for="anexoProjeto" class="col-form-label">{{ __('Anexo do projeto') }} <span style="color: red; font-weight:bold">*</span></label>
@if(old('anexoProjetoPreenchido') != null || (isset($rascunho) && $rascunho->anexoProjeto != ""))
<a id="anexoProjetoTemp" href="{{ route('baixar.anexo.temp', ['eventoId' => $edital->id,
'nomeAnexo' => 'anexoProjeto' ])}}">Arquivo atual</a>
@endif
<input type="hidden" id="anexoProjetoPreenchido" name="anexoProjetoPreenchido"
@if( isset($rascunho) && $rascunho->anexoProjeto != "") value="sim" @else value="{{old('anexoProjetoPreenchido')}}" @endif required>
<input type="hidden" id="anexoProjeto" name="anexoProjetoPreenchido"
@if( isset($rascunho) && $rascunho->anexoProjeto != "") value="sim" @else value="{{old('anexoProjetoPreenchido')}}" @endif >
<div class="input-group">
<div class="custom-file">
......@@ -162,7 +177,7 @@
@enderror
</div>
<div class="col-sm-6">
<div class="form-group col-md-6" style="margin-top: 10px">
<label for="anexoLattesCoordenador" class="col-form-label">{{ __('Anexo do currículo Lattes do Coordenador') }} <span style="color: red; font-weight:bold">*</span></label>
@if(old('anexoLattesPreenchido') != null || (isset($rascunho) && $rascunho->anexoLattesCoordenador != ""))
<a id="anexoLattesTemp" href="{{ route('baixar.anexo.temp', ['eventoId' => $edital->id,
......@@ -185,7 +200,7 @@
</span>
@enderror
</div>
<div class="col-sm-6 mt-3">
<div class="form-group col-md-6">
<label for="anexoPlanilha" class="col-form-label">{{ __('Anexo da Planilha de Pontuação') }} <span style="color: red; font-weight:bold">*</span></label>
@if(old('anexoPlanilhaPreenchido') != null || (isset($rascunho) && $rascunho->anexoPlanilhaPontuacao != ""))
<a id="anexoPlanilhaTemp" href="{{ route('baixar.anexo.temp', ['eventoId' => $edital->id,
......@@ -211,8 +226,7 @@
</span>
@enderror
</div>
{{-- Decisão do CONSU --}}
<div class="col-sm-6" style="margin-top: 15px">
<div class="form-group col-md-6">
<label for="anexoCONSU" class="col-form-label">{{ __('Decisão do CONSU') }} <span style="color: red; font-weight:bold">*</span></label>
@if(old('anexoConsuPreenchido') != null || (isset($rascunho) && $rascunho->anexoDecisaoCONSU != "" && $rascunho->anexoDecisaoCONSU != null))
<a id="anexoConsuTemp" href="{{ route('baixar.anexo.temp', ['eventoId' => $edital->id,
......@@ -233,9 +247,7 @@
</span>
@enderror
</div>
<div class="col-sm-6" style="margin-top: 15px">
<div class="form-group col-md-6">
<label for="botao" class="col-form-label @error('botao') is-invalid @enderror" data-toggle="tooltip" data-placement="bottom" title="Se possuir, coloque todas em único arquivo pdf." style="margin-right: 15px;">{{ __('Possui autorizações especiais?') }} <span style="color: red; font-weight:bold">*</span></label>
<input type="radio" id="radioSim" onchange="displayAutorizacoesEspeciais('sim')">
<label for="radioSim" style="margin-right: 5px">Sim</label>
......@@ -295,113 +307,400 @@
</span>
@enderror
</div>
</div>
<div class="form-group col-md-6 mt-3" style="margin-bottom:-0.5rem;">
@if($edital->tipo == 'PIBIC' || $edital->tipo == 'PIBIC-EM')
@endif
</div>
</div>
</div>
</div>
</div>
<!--X Anexos X-->
<!-- Participantes -->
<div class="col-md-10" style="text-align: center; margin-top:2rem"><h4 style="margin-top: 1rem;">4º Passo</h4></div>
<div class="col-md-10" style="text-align: center;"><h5 style="margin-bottom:1rem;color:#909090">Área do(s) participante(s)</h5></div>
<div class="col-md-10">
<div class="card" style="border-radius: 12px; padding:15px">
<div class="card-body" style="margin-bottom: -2rem">
<div class="d-flex justify-content-between align-items-center">
<div><h5 style="color: #1492E6; margin-top:0.5rem">Participante(s)</h5></div>
<div><div class="dropdown">
<button class="btn btn-light dropdown-toggle" type="button" id="dropdownMenuButtonAlterar" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" style="display: none">
Selecionar
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButtonAlterar">
<a type="button" class="dropdown-item" onclick="alterarFormacao(1)">1 Participante</a>
<a type="button" class="dropdown-item" onclick="alterarFormacao(2)">2 Participantes</a>
<a type="button" class="dropdown-item" onclick="alterarFormacao(3)">3 Participantes</a>
</div>
</div></div>
</div>
<div style="margin-top:-10px"><hr style="border-top: 1px solid#1492E6"></div>
</div>
<div class="d-flex justify-content-between align-items-center" style="margin-top:2.5rem; margin-bottom:-0.2rem">
<h4 style="margin-top: 10px; margin-bottom:-5px; color: #01487E; font-weight:bold; font-family:Arial, Helvetica, sans-serif; margin-right:15px">PARTICIPANTE</h4>
<button class="btn btn-primary" id="addCoautor" style="">Adicionar participante</button>
</div>
<hr style="border-bottom: 1px solid #01487E">
{{-- Participantes --}}
<div class="row" style="margin-top:20px">
<div class="col-sm-12">
<div id="participantes">
@php $countParticipante = 1; @endphp
@if(old('countParticipante') != null)
@php $countParticipante = old('countParticipante') @endphp
@endif
<div class="card-body" id="selecaoParticipantes" style="text-align: center; display:block; margin-top:1rem">
<div><h5>Selecione o número de participantes do projeto</h5></div>
<div class="btn-group" style="text-align:center">
<button type="button" class="btn btn-light" onclick="selecionarParticipantes('1')" style="width: 123px; margin:5px; border-radius:12px">
<div class="form-row">
<div class="col-md-12" style="margin-top: 10px;"><img src="{{asset('/img/icons/icon_1_participantes.png')}}" alt="Logo" style="width: 25px" /></div>
<div class="col-md-12" style="margin-top: 10px; margin-bottom:5px"><h6>1 Participante</h6></div>
</div>
</button>
<button type="button" class="btn btn-light" onclick="selecionarParticipantes('2')" style="width: 123px; margin:5px; border-radius:12px">
<div class="form-row">
<div class="col-md-12" style="margin-top: 10px;"><img src="{{asset('/img/icons/icon_2_participantes.png')}}" alt="Logo" style="width: 60px" /></div>
<div class="col-md-12" style="margin-top: 10px; margin-bottom:5px"><h6>2 Participantes</h6></div>
</div>
</button>
<button type="button" class="btn btn-light" onclick="selecionarParticipantes('3')" style="width: 123px; margin:5px; border-radius:12px">
<div class="form-row">
<div class="col-md-12" style="margin-top: 10px;"><img src="{{asset('/img/icons/icon_3_participantes.png')}}" alt="Logo" style="width: 90px" /></div>
<div class="col-md-12" style="margin-top: 13px; margin-bottom:5px"><h6>3 Participantes</h6></div>
</div>
</button>
</div>
</div>
@if ($countParticipante != null && $countParticipante > 0)
@for ($i = 0; $i < $countParticipante; $i++)
{{-- inicio do card --}}
{{-- <div class="card" >
<div class="card-body"> --}}
<div class="card-body">
<div id="participante1" style="display:none; margin-bottom:15px">
<div class="form-row">
<div class="col-md-12"><h5>Clique em um dos participantes para preencher os dados</h5></div>
<div class="col-md-12">
<a class="btn btn-light" data-toggle="collapse" href="#collapseParticipante1" role="button" aria-expanded="false" aria-controls="collapseParticipante1" id="buttonParticipante1" style="width: 100%; text-align:left">
<div class="d-flex justify-content-between align-items-center">
<h4 id="buttonTitulo1" style="color: #01487E; font-size:17px; margin-top:5px">Participante 1</h4>
</div>
</a>
</div>
<div class="col-md-12">
<div class="collapse" id="collapseParticipante1">
<div class="container">
<div class="form-row mt-3">
<div class="col-md-12"><h5>Dados do participante</h5></div>
<div class="form-group col-md-6">
<label for="nomeCompletoParticipante1">Nome completo <span style="color: red; font-weight:bold">*</span></label>
<input type="text" class="form-control @error('nomeCompletoParticipante1') is-invalid @enderror" id="nomeCompletoParticipante1" name="nomeParticipante[]" placeholder="Digite o nome completo do participante" required>
@error('nomeCompletoParticipante1')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div id="novoParticipante" style="display: block; margin-top:-1rem;">
<div style="background-color: #9FCAEB; margin-left:-20px; margin-right:-20px">
<div class="d-flex justify-content-between align-items-center" style="margin-top: 5px; margin-bottom:4px; margin-left:1px; margin-right:20px">
<div class="container" style="margin-left: 5px; height:40px;">
<h5 style="padding-top:10px; padding-bottom:15px; color:#01487E">Participante</label>
</div>
<div>
<button class="btn btn-danger mt-2 mb-2 delete" style='width:100%;margin-top:10px' disabled>Limite minimo de participantes</button>
</div>
<div class="form-group col-md-6">
<label for="email1">E-mail <span style="color: red; font-weight:bold">*</span></label>
<input type="email" class="form-control @error('email1') is-invalid @enderror" id="email1" name="emailParticipante[]" placeholder="Digite o e-mail do participante" required>
@error('email')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div>
<h5 class="card-title" style="color: #1492E6; margin-top:1.3rem; margin-bottom:0.7rem">Dados do participante</h5>
<div class="row">
<div class="col-sm-6">
<label>Nome Completo <span style="color: red; font-weight:bold">*</span></label>
<input type="text" style="margin-bottom:10px" class="form-control @error('nomeParticipante') is-invalid @enderror" name="nomeParticipante[]" placeholder="Digite o nome do participante" value="{{old('nomeParticipante.'.$i)}}" required>
@error('nomeParticipante.'.$i)
<input type="hidden" name="funcaoParticipante[]" value="4">
<div class="form-group col-md-6">
<label for="data1">Data de nascimento <span style="color: red; font-weight:bold">*</span></label>
<input type="date" class="form-control @error('data1') is-invalid @enderror" id="data1" name="data_de_nascimento[]" required>
@error('data1')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="form-group col-md-6">
<label for="cpf1">CPF <span style="color: red; font-weight:bold">*</span></label>
<input type="text" class="form-control @error('cpf1') is-invalid @enderror" id="cpf1" name="cpf[]" placeholder="Digite o CPF do participante" required>
@error('cpf1')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="col-sm-6">
<label>E-mail <span style="color: red; font-weight:bold">*</span></label>
<input type="email" style="margin-bottom:10px" class="form-control @error('emailParticipante') is-invalid @enderror" name="emailParticipante[]" placeholder="Digite o e-mail do participante" value="{{old('emailParticipante.'.$i)}}" required>
@error('emailParticipante.'.$i)
<div class="form-group col-md-6">
<label for="rg1">RG <span style="color: red; font-weight:bold">*</span></label>
<input type="text" class="form-control @error('rg1') is-invalid @enderror" id="rg1" name="rg[]" placeholder="Digite o RG do participante" required>
@error('rg1')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="col-sm-3">
<input type="hidden" name="funcaoParticipante[]" value="4">
<div class="form-group col-md-6">
<label for="celular1">Celular <span style="color: red; font-weight:bold">*</span></label>
<input type="text" class="form-control @error('celular1') is-invalid @enderror" id="celular1" name="celular[]" placeholder="Digite o telefone do participante" required>
@error('celular1')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div>
<div id="dados_complemento_1">
<div class="form-group">
<div class="row">
<div class="col-sm-3" style="margin-top: 5px">
<label for="">{{ __('Data de nascimento ') }} <span style="color: red; font-weight:bold">*</span></label>
<input type="date" class="form-control" name="data_de_nascimento[]" required>
</div>
<div class="col-sm-3" style="margin-top: 5px">
<label for="">{{ __('CPF') }} <span style="color: red; font-weight:bold">*</span></label>
<input type="text" class="form-control cpf" placeholder="000.000.000-00" name="cpf[]" required>
</div>
<div class="col-sm-3" style="margin-top: 5px">
<label for="">{{ __('RG') }} <span style="color: red; font-weight:bold">*</span></label>
<input type="text" class="form-control rg" placeholder="00.000.000-0" name="rg[]" required>
</div>
<div class="col-sm-3" style="margin-top: 5px">
<label for="">{{ __('Celular') }} <span style="color: red; font-weight:bold">*</span></label>
<input type="text" class="form-control celular" placeholder="(00) 00000-0000" name="celular[]" required>
</div>
</div>
<div class="col-md-12"><h5>Endereço</h5></div>
<div class="form-group col-md-6">
<label for="cep1">CEP <span style="color: red; font-weight:bold">*</span></label>
<input type="text" class="form-control @error('cep1') is-invalid @enderror" id="cep1" name="cep[]" placeholder="Digite o CEP do participante" required>
@error('cep1')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="form-group col-md-6">
<label for="estado1">Estado <span style="color: red; font-weight:bold">*</span></label>
<select name="uf[]" id="estado1" class="form-control" style="visibility: visible" required>
<option value="" disabled selected>-- Selecione o estado --</option>
<option @if(old('uf') == 'AC') selected @endif value="AC">Acre</option>
<option @if(old('uf') == 'AL') selected @endif value="AL">Alagoas</option>
<option @if(old('uf') == 'AP') selected @endif value="AP">Amapá</option>
<option @if(old('uf') == 'AM') selected @endif value="AM">Amazonas</option>
<option @if(old('uf') == 'BA') selected @endif value="BA">Bahia</option>
<option @if(old('uf') == 'CE') selected @endif value="CE">Ceará</option>
<option @if(old('uf') == 'DF') selected @endif value="DF">Distrito Federal</option>
<option @if(old('uf') == 'ES') selected @endif value="ES">Espírito Santo</option>
<option @if(old('uf') == 'GO') selected @endif value="GO">Goiás</option>
<option @if(old('uf') == 'MA') selected @endif value="MA">Maranhão</option>
<option @if(old('uf') == 'MT') selected @endif value="MT">Mato Grosso</option>
<option @if(old('uf') == 'MS') selected @endif value="MS">Mato Grosso do Sul</option>
<option @if(old('uf') == 'MG') selected @endif value="MG">Minas Gerais</option>
<option @if(old('uf') == 'PA') selected @endif value="PA">Pará</option>
<option @if(old('uf') == 'PB') selected @endif value="PB">Paraíba</option>
<option @if(old('uf') == 'PR') selected @endif value="PR">Paraná</option>
<option @if(old('uf') == 'PE') selected @endif value="PE">Pernambuco</option>
<option @if(old('uf') == 'PI') selected @endif value="PI">Piauí</option>
<option @if(old('uf') == 'RJ') selected @endif value="RJ">Rio de Janeiro</option>
<option @if(old('uf') == 'RN') selected @endif value="RN">Rio Grande do Norte</option>
<option @if(old('uf') == 'RS') selected @endif value="RS">Rio Grande do Sul</option>
<option @if(old('uf') == 'RO') selected @endif value="RO">Rondônia</option>
<option @if(old('uf') == 'RR') selected @endif value="RR">Roraima</option>
<option @if(old('uf') == 'SC') selected @endif value="SC">Santa Catarina</option>
<option @if(old('uf') == 'SP') selected @endif value="SP">São Paulo</option>
<option @if(old('uf') == 'SE') selected @endif value="SE">Sergipe</option>
<option @if(old('uf') == 'TO') selected @endif value="TO">Tocantins</option>
</select>
</div>
<div class="form-group col-md-6">
<label for="cidade1">Cidade <span style="color: red; font-weight:bold">*</span></label>
<input type="text" class="form-control @error('cidade1') is-invalid @enderror" id="cidade1" name="cidade[]" placeholder="Digite o nome da cidade" required>
@error('cidade1')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="form-group col-md-6">
<label for="bairro1">Bairro <span style="color: red; font-weight:bold">*</span></label>
<input type="text" class="form-control @error('bairro1') is-invalid @enderror" id="bairro1" name="bairro[]" placeholder="Digite o nome do bairro"required>
@error('bairro1')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="form-group col-md-6">
<label for="rua1">Rua <span style="color: red; font-weight:bold">*</span></label>
<input type="text" class="form-control @error('rua1') is-invalid @enderror" id="rua1" name="rua[]" placeholder="Digite o nome da avenida, rua, travessa..." required>
@error('rua1')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="form-group col-md-6">
<label for="numero1">Número <span style="color: red; font-weight:bold">*</span></label>
<input type="text" class="form-control @error('numero1') is-invalid @enderror" id="numero1" name="numero[]" placeholder="Digite o número" required>
@error('numero1')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="form-group col-md-12">
<label for="complemento1">Complemento <span style="color: red; font-weight:bold">*</span></label>
<textarea type="text" class="form-control @error('complemento1') is-invalid @enderror" id="complemento1" name="complemento[]" placeholder="Apartamento, casa, sítio..." required></textarea>
@error('complemento1')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="col-md-12"><h5>Dados do curso</h5></div>
<div class="form-group col-md-12">
<label for="universidade1">Universidade <span style="color: red; font-weight:bold">*</span></label>
<input type="text" class="form-control @error('universidade1') is-invalid @enderror" id="universidade1" name="universidade[]" placeholder="Digite o nome da universidade" required>
@error('universidade1')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="form-group col-md-12">
<label for="curso1">Curso <span style="color: red; font-weight:bold">*</span></label>
<input type="text" class="form-control @error('curso1') is-invalid @enderror" id="curso1" name="curso[]" placeholder="Digite o nome do curso" required>
@error('curso1')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="form-group col-md-6">
<label for="turno1">Turno <span style="color: red; font-weight:bold">*</span></label>
<select id="turno1" class="form-control" name="turno[]" >
<option value="" disabled selected>-- TURNO --</option>
@foreach ($enum_turno as $turno)
<option value="{{$turno}}">{{$turno}}</option>
@endforeach
</select>
</div>
<div class="form-group">
<div class="row">
<div class="container">
<h5 style="color: #1492E6; margin-top:0.5rem; margin-bottom:-0.2rem">Endereço do participante</h5>
</div>
<div class="form-group col-md-6">
<label for="totalDePeriodos1">{{ __('Total de períodos do curso') }} <span style="color: red; font-weight:bold">*</span></label>
<select name="total_periodos[]" id="totalDePeriodos1" class="form-control" onchange="gerarPeriodos1(this)" >
<option value="" disabled selected>-- TOTAL DE PERIODOS --</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
</select>
</div>
<div class="form-group col-md-6">
<label for="periodoAtual1">{{ __('Período atual') }} <span style="color: red; font-weight:bold">*</span></label>
<select name="periodo_cursado[]" id="periodoAtual1" class="form-control" >
<option value="" disabled selected>-- PERÍODO ATUAL --</option>
</select>
</div>
<div class="form-group col-md-6">
<label for="ordemDePrioridade1">{{ __('Ordem de prioridade') }} <span style="color: red; font-weight:bold">*</span></label>
<select name="ordem_prioridade[]" id="ordemDePrioridade1" class="form-control" >
<option value="" disabled selected>-- ORDEM --</option>
<option value="1">1º</option>
<option value="2">2º</option>
<option value="3">3º</option>
</select>
</div>
<div class="form-group col-md-6">
<label for="coeficienteDeRendimento1">Coeficiente de rendimento <span style="color: red; font-weight:bold">*</span></label>
<input type="number" class="form-control media" id="coeficienteDeRendimento1" min="0" max="10" step="0.01" value="00.00" name="media_geral_curso[]" required>
@error('coeficienteDeRendimento1')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="col-md-12"><h5>Plano de trabalho</h5></div>
<div class="form-group col-md-6">
<label for="titulo1">Título <span style="color: red; font-weight:bold">*</span></label>
<input type="text" class="form-control @error('titulo1') is-invalid @enderror" id="titulo1" name="nomePlanoTrabalho[]" placeholder="Digite o título do plano de trabalho" required>
@error('titulo1')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="form-group col-md-6">
<label for="anexoPlanoDeTrabalho1">Anexo <span style="color: red; font-weight:bold">*</span></label>
<div class="custom-file">
<input type="file" class="custom-file-input @error('anexoPlanoTrabalho') is-invalid @enderror" id="anexoPlanoDeTrabalho1" aria-describedby="anexoPlanoTrabalho" name="anexoPlanoTrabalho[]" onchange="verificarArquivoAnexado_pdf(this)" required>
<label class="custom-file-label" id="anexoPlanoDeTrabalho1" for="inputGroupFile01">O arquivo deve ser no formato PDF de até 2MB.</label>
</div>
<div class="row">
<div class="col-sm-6" style="margin-top: 15px">
<label for="">{{ __('CEP') }} <span style="color: red; font-weight:bold">*</span></label>
<input type="text" class="form-control" placeholder="Digite o CEP do participante" name="cep[]" required>
</div>
<div class="col-sm-6" style="margin-top: 15px">
<label for="">{{ __('Estado') }} <span style="color: red; font-weight:bold">*</span></label>
<select name="uf[]" id="" class="form-control" required>
@error('anexoPlanoDeTrabalho1')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="posicaoParticipante2"></div>
<div id="participante2" style="display:none; margin-bottom:15px">
<div class="form-row">
<div class="col-md-12">
<a class="btn btn-light" data-toggle="collapse" href="#collapseParticipante2" role="button" aria-expanded="false" aria-controls="collapseParticipante2" style="width: 100%; text-align:left">
<div class="d-flex justify-content-between align-items-center">
<h4 style="color: #01487E; font-size:17px; margin-top:5px">Participante 2</h4>
</div>
</a>
</div>
<div class="col-md-12">
<div class="collapse" id="collapseParticipante2">
<div class="container">
<div class="form-row mt-3">
<div class="col-md-12"><h5>Dados do participante</h5></div>
<div class="form-group col-md-6">
<label for="nomeCompletoParticipante2">Nome completo <span style="color: red; font-weight:bold">*</span></label>
<input type="text" class="form-control @error('nomeCompletoParticipante2') is-invalid @enderror" id="nomeCompletoParticipante2" name="nomeParticipante[]" placeholder="Digite o nome completo do participante" required>
@error('nomeCompletoParticipante2')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<input type="hidden" name="funcaoParticipante[]" value="4">
<div class="form-group col-md-6">
<label for="email2">E-mail <span style="color: red; font-weight:bold">*</span></label>
<input type="email" class="form-control @error('email2') is-invalid @enderror" id="email2" name="emailParticipante[]" placeholder="Digite o e-mail do participante" required>
@error('email2')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="form-group col-md-6">
<label for="data2">Data de nascimento <span style="color: red; font-weight:bold">*</span></label>
<input type="date" class="form-control @error('data2') is-invalid @enderror" id="data2" name="data_de_nascimento[]" required>
@error('data2')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="form-group col-md-6">
<label for="cpf2">CPF <span style="color: red; font-weight:bold">*</span></label>
<input type="text" class="form-control @error('cpf2') is-invalid @enderror" id="cpf2" name="cpf[]" placeholder="Digite o CPF do participante" required>
@error('cpf2')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="form-group col-md-6">
<label for="rg2">RG <span style="color: red; font-weight:bold">*</span></label>
<input type="text" class="form-control @error('rg2') is-invalid @enderror" id="rg2" name="rg[]" placeholder="Digite o RG do participante" required>
@error('rg2')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="form-group col-md-6">
<label for="celular2">Celular <span style="color: red; font-weight:bold">*</span></label>
<input type="text" class="form-control @error('celular2') is-invalid @enderror" id="celular2" name="celular[]" placeholder="Digite o telefone do participante" required>
@error('celular2')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="col-md-12"><h5>Endereço</h5></div>
<div class="form-group col-md-6">
<label for="cep2">CEP <span style="color: red; font-weight:bold">*</span></label>
<input type="text" class="form-control @error('cep2') is-invalid @enderror" id="cep2" name="cep[]" placeholder="Digite o CEP do participante" required>
@error('cep2')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="form-group col-md-6">
<label for="estado2">Estado <span style="color: red; font-weight:bold">*</span></label>
<select name="uf[]" id="estado2" class="form-control" style="visibility: visible" required>
<option value="" disabled selected>-- Selecione o estado --</option>
<option @if(old('uf') == 'AC') selected @endif value="AC">Acre</option>
<option @if(old('uf') == 'AL') selected @endif value="AL">Alagoas</option>
......@@ -431,75 +730,83 @@
<option @if(old('uf') == 'SE') selected @endif value="SE">Sergipe</option>
<option @if(old('uf') == 'TO') selected @endif value="TO">Tocantins</option>
</select>
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-sm-6" style="">
<label for="">{{ __('Cidade') }} <span style="color: red; font-weight:bold">*</span></label>
<input type="text" class="form-control " placeholder="Digite o nome da cidade" name="cidade[]" required>
</div>
<div class="col-sm-6" >
<label for="">{{ __('Bairro') }} <span style="color: red; font-weight:bold">*</span></label>
<input type="text" class="form-control" placeholder="Digite o nome do bairro" name="bairro[]" required>
</div>
<div class="col-sm-6" style="margin-top: 15px">
<label for="">{{ __('Rua') }} <span style="color: red; font-weight:bold">*</span></label>
<input type="text" class="form-control" placeholder="Digite o nome da rua" name="rua[]" required>
</div>
<div class="col-sm-6" style="margin-top: 15px">
<label for="">{{ __('Número') }} <span style="color: red; font-weight:bold">*</span></label>
<input type="text" class="form-control" placeholder="Digite o nome da rua" name="numero[]" required>
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-sm-12">
<label for="">{{ __('Complemento') }} <span style="color: red; font-weight:bold">*</span></label>
<textarea type="text" class="form-control" placeholder="Apartamento, casa, sítio..." name="complemento[]" required></textarea>
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="container">
<h5 style="color: #1492E6; margin-top:0.5rem; margin-bottom:0.7rem">Dados do curso do participante</h5>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<label for="">{{ __('Universidade') }} <span style="color: red; font-weight:bold">*</span></label>
<input type="text" class="form-control" placeholder="Digite o nome da universidade" name="universidade[]" required>
</div>
<div class="col-sm-6" style="margin-top: 15px">
<label for="">{{ __('Curso') }} <span style="color: red; font-weight:bold">*</span></label>
<input type="text" class="form-control" placeholder="Digite o nome do curso" name="curso[]" required>
</div>
<div class="col-sm-6" style="margin-top: 15px">
<label for="">{{ __('Turno') }} <span style="color: red; font-weight:bold">*</span></label>
<select id="" class="form-control" name="turno[]" required>
<option value="" disabled selected>-- TURNO --</option>
@foreach ($enum_turno as $turno)
<option value="{{$turno}}">{{$turno}}</option>
@endforeach
</select>
</div>
</div>
</div>
<div class="form-group" style="margin-bottom: 2rem">
<div class="row">
<div class="col-sm-3" style="margin-top: 15px">
<label for="">{{ __('Total de períodos do curso') }} <span style="color: red; font-weight:bold">*</span></label>
<select name="total_periodos[]" id="" class="form-control" onchange="gerarPeriodos(this)" required>
</div>
<div class="form-group col-md-6">
<label for="cidade2">Cidade <span style="color: red; font-weight:bold">*</span></label>
<input type="text" class="form-control @error('cidade2') is-invalid @enderror" id="cidade2" name="cidade[]" placeholder="Email" required>
@error('cidade2')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="form-group col-md-6">
<label for="bairro2">Bairro <span style="color: red; font-weight:bold">*</span></label>
<input type="text" class="form-control @error('bairro2') is-invalid @enderror" id="bairro2" name="bairro[]" placeholder="Digite o nome do bairro" required>
@error('bairro2')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="form-group col-md-6">
<label for="rua2">Rua <span style="color: red; font-weight:bold">*</span></label>
<input type="text" class="form-control @error('rua2') is-invalid @enderror" id="rua2" name="rua[]" placeholder="Digite o nome da avenida, rua, travessa..." required>
@error('rua2')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="form-group col-md-6">
<label for="numero2">Número <span style="color: red; font-weight:bold">*</span></label>
<input type="text" class="form-control @error('numero2') is-invalid @enderror" id="numero2" name="numero[]" placeholder="Digite o número" required>
@error('numero2')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="form-group col-md-12">
<label for="complemento2">Complemento <span style="color: red; font-weight:bold">*</span></label>
<textarea type="text" class="form-control @error('complemento2') is-invalid @enderror" id="complemento2" name="complemento[]" placeholder="Apartamento, casa, sítio..." required></textarea>
@error('complemento2')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="col-md-12"><h5>Dados do curso</h5></div>
<div class="form-group col-md-12">
<label for="universidade2">Universidade <span style="color: red; font-weight:bold">*</span></label>
<input type="text" class="form-control @error('universidade2') is-invalid @enderror" id="universidade2" name="universidade[]" placeholder="Digite o nome da universidade" required>
@error('universidade2')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="form-group col-md-12">
<label for="curso2">Curso <span style="color: red; font-weight:bold">*</span></label>
<input type="text" class="form-control @error('curso2') is-invalid @enderror" id="curso2" name="curso[]" placeholder="Digite o nome do curso" required>
@error('curso2')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="form-group col-md-6">
<label for="turno2">Turno <span style="color: red; font-weight:bold">*</span></label>
<select id="turno2" class="form-control" name="turno[]" required>
<option value="" disabled selected>-- TURNO --</option>
@foreach ($enum_turno as $turno)
<option value="{{$turno}}">{{$turno}}</option>
@endforeach
</select>
</div>
<div class="form-group col-md-6">
<label for="totalDePeriodos2">{{ __('Total de períodos do curso') }} <span style="color: red; font-weight:bold">*</span></label>
<select name="total_periodos[]" id="totalDePeriodos2" class="form-control" onchange="gerarPeriodos1(this)" required>
<option value="" disabled selected>-- TOTAL DE PERIODOS --</option>
<option value="6">6</option>
<option value="7">7</option>
......@@ -509,538 +816,427 @@
<option value="11">11</option>
<option value="12">12</option>
</select>
</div>
<div class="col-sm-3" style="margin-top: 15px">
<label for="">{{ __('Período atual') }} <span style="color: red; font-weight:bold">*</span></label>
<select name="periodo_cursado[]" id="" class="form-control" required>
<option value="" disabled selected>-- PERÍODO ATUAL --</option>
</select>
</div>
<div class="col-sm-3" style="margin-top: 15px">
<label for="">{{ __('Ordem de prioridade') }} <span style="color: red; font-weight:bold">*</span></label>
<select name="ordem_prioridade[]" id="" class="form-control" required>
</div>
<div class="form-group col-md-6">
<label for="periodoAtual2">{{ __('Período atual') }} <span style="color: red; font-weight:bold">*</span></label>
<select name="periodo_cursado[]" id="periodoAtual2" class="form-control" required >
<option value="" disabled selected>-- PERÍODO ATUAL --</option>
</select>
</div>
<div class="form-group col-md-6">
<label for="ordemDePrioridade2">{{ __('Ordem de prioridade') }} <span style="color: red; font-weight:bold">*</span></label>
<select name="ordem_prioridade[]" id="ordemDePrioridade2" class="form-control" required>
<option value="" disabled selected>-- ORDEM --</option>
<option value="1">1º</option>
<option value="2">2º</option>
<option value="3">3º</option>
<option value="4">4º</option>
</select>
</div>
<div class="col-sm-3" style="margin-top: 15px">
<label for="">{{ __('Coeficiente de rendimento') }} <span style="color: red; font-weight:bold">*</span></label>
<input type="number" class="form-control media" min="0" max="10" step="0.01" value="00.00" name="media_geral_curso[]" required>
</div>
<div class="col-sm-12">
<div class="row">
<div class="container">
<h5 style="color: #1492E6; margin-top:1.5rem; margin-bottom:0.7rem">Plano de trabalho</h5>
</div>
</div>
</div>
<div class="col-sm-6">
<label>Titulo <span style="color: red; font-weight:bold">*</span> </label>
<input type="text" style="margin-bottom:10px" class="form-control @error('nomePlanoTrabalho') is-invalid @enderror" name="nomePlanoTrabalho[]" placeholder="Digite o título do plano de trabalho" value="{{old('nomePlanoTrabalho.'.$i)}}" required>
@error('nomePlanoTrabalho')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="col-sm-6">
<div class="custom-file">
<label for="nomeTrabalho">Anexo <span style="color: red; font-weight:bold">*</span></label>
<div class="input-group">
<div class="custom-file">
<input type="file" class="custom-file-input @error('anexoPlanoTrabalho') is-invalid @enderror" id="anexoPlanoTrabalho" aria-describedby="anexoPlanoTrabalho" name="anexoPlanoTrabalho[]" onchange="verificarArquivoAnexado_pdf(this)" required>
<label class="custom-file-label" id="custom-file-label" for="inputGroupFile01">O arquivo deve ser no formato PDF de até 2MB.</label>
</div>
</div>
@error('anexoPlanoTrabalho')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div>
</div>
</div>
<div class="form-group col-md-6">
<label for="coeficienteDeRendimento2">Coeficiente de rendimento <span style="color: red; font-weight:bold">*</span></label>
<input type="number" class="form-control media" id="coeficienteDeRendimento2" min="0" max="10" step="0.01" value="00.00" name="media_geral_curso[]" required>
@error('coeficienteDeRendimento2')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="col-md-12"><h5>Plano de trabalho</h5></div>
<div class="form-group col-md-6">
<label for="titulo2">Título <span style="color: red; font-weight:bold">*</span></label>
<input type="text" class="form-control @error('titulo2') is-invalid @enderror" id="titulo2" name="nomePlanoTrabalho[]" placeholder="Digite o título do plano de trabalho" required>
@error('titulo2')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="form-group col-md-6">
<label for="anexoPlanoDeTrabalho2">Anexo <span style="color: red; font-weight:bold">*</span></label>
<div class="custom-file">
<input type="file" class="custom-file-input @error('anexoPlanoTrabalho') is-invalid @enderror" id="anexoPlanoDeTrabalho2" aria-describedby="anexoPlanoTrabalho" name="anexoPlanoTrabalho[]" onchange="verificarArquivoAnexado_pdf(this)" required>
<label class="custom-file-label" id="anexoPlanoDeTrabalho2" for="inputGroupFile01">O arquivo deve ser no formato PDF de até 2MB.</label>
</div>
@error('anexoPlanoDeTrabalho2')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div>
{{-- </div>
</div> --}}
{{-- inicio do card --}}
@endfor
@endif
</div>
</div>
<input type="hidden" name="countParticipante" id="countParticipante" value="{{ old('countParticipante') != null ? old('countParticipante') : 1}}">
</div>
</div>
<hr>
</p>
<div class="row justify-content-center">
{{-- <div class="col-md-6">
<button type="submit" formaction="{{route('trabalho.storeParcial')}}" class="btn btn-primary" style="width:100%;margin-bottom:10px">
{{ __('Salvar como Rascunho') }}
</button>
</div> --}}
<div class="col-md-12 d-flex justify-content-between align-items-center" style="margin-top:0.5rem; margin-bottom:-1rem">
<h6 style="font-family:Arial, Helvetica, sans-serif; margin-right:15px"><span style="color: red; font-weight:bold">*</span> Campos obrigatórios</h6>
<button type="submit" class="btn btn-success" style="" onclick="validarForm()">{{ __('Enviar Projeto') }}</button>
</div>
</div>
<br>
<!--<div class="row justify-content-center">
<div class="col-sm-12">
@if (Auth()->user()->administradors != null)
<a href="{{ route('admin.editais') }}" class="btn btn-secondary" style="width:100%">Cancelar</a>
@else
<a href="{{ route('proponente.projetosEdital', ['id' => $edital->id]) }}" class="btn btn-secondary" style="width:100%">Cancelar</a>
@endif
</div>
<div id="posicaoParticipante3"></div>
<div id="participante3" style="display:none; margin-bottom:15px">
<div class="form-row">
<div class="col-md-12">
<a class="btn btn-light" data-toggle="collapse" href="#collapseParticipante3" role="button" aria-expanded="false" aria-controls="collapseParticipante3" style="width: 100%; text-align:left">
<div class="d-flex justify-content-between align-items-center">
<h4 style="color: #01487E; font-size:17px; margin-top:5px">Participante 3</h4>
</div>
</a>
</div>
</div>-->
</form>
</div>
</div>
</div>
</div>
</div>
<!-- Modal de Aviso Edit -->
<div class="modal fade" id="exampleModalAnexarDocumento" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel2" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header" id="idCorCabecalhoModalDocumento">
<h5 class="modal-title" id="exampleModalLabel2" style="font-size:20px; margin-top:7px; color:white; font-weight:bold; font-family: 'Roboto', sans-serif;">Aviso</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<div class="row">
<div class="col-12" style="font-family: 'Roboto', sans-serif;"><label id="idTituloDaMensagemModalDocumento"></label></div>
<div class="col-12" style="font-family: 'Roboto', sans-serif; margin-top:10px;">
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-light" data-dismiss="modal"style="width:200px;">Fechar</button>
</div>
</div>
</div>
</div>
@endsection
@section('javascript')
<script type="text/javascript">
$(function() {
var qtdLinhas = 1;
const limiteMaxParticipantes = 3;
const limiteMinParticipantes = 1;
// Coautores
$('#addCoautor').click(function(e) {
var countParticipante = document.getElementById('countParticipante');
if (countParticipante.value < limiteMaxParticipantes) {
e.preventDefault();
linha = montarLinhaInput(parseInt(countParticipante.value) + 1);
$('#participantes').append(linha);
setParticipanteDiv(parseInt(countParticipante.value) + 1);
var btnsDeletar = document.getElementsByClassName("delete");
for(var i = 0; i < btnsDeletar.length; i++) {
btnsDeletar[i].disabled = "";
$(btnsDeletar[i]).text("Remover participantes");
}
if (countParticipante.value >= limiteMaxParticipantes) {
var btn = document.getElementById('addCoautor');
btn.disabled = "true";
$('#addCoautor').text("Limite de participantes atingido");
}
// aplicarMascaras();
}
});
function setParticipanteDiv(qtdParticipante) {
var countParticipante = document.getElementById('countParticipante');
countParticipante.value = qtdParticipante;
}
$('#addPlanoTrabalho').click(function(e) {
e.preventDefault();
if (qtdLinhas < 4) {
linha = montarLinhaInputPlanoTrabalho();
//$('#planoTrabalho').append(linha);
qtdLinhas++;
}
});
// // Exibir modalidade de acordo com a área
// $("#area").change(function() {
// console.log($(this).val());
// addModalidade($(this).val());
// });
$(document).on('click', '.delete', function() {
var countParticipante = document.getElementById('countParticipante');
if (countParticipante.value >= limiteMinParticipantes) {
setParticipanteDiv(parseInt(countParticipante.value) - 1);
$(this).closest('#novoParticipante').remove();
document.getElementById("addCoautor").disabled = "";
$('#addCoautor').text("Adicionar participante");
if (countParticipante.value == limiteMinParticipantes) {
var btnsDeletar = document.getElementsByClassName("delete");
for(var i = 0; i < btnsDeletar.length; i++) {
btnsDeletar[i].disabled = true;
$(btnsDeletar).text("Limite minimo de participantes");
}
}
return false;
}
});
$(document).on('click', '.deletePlano', function() {
if (qtdLinhas > 1) {
qtdLinhas--;
$("#planoTrabalho div.row:last").remove();
return false;
}
});
$('.custom-file-input').on('change', function() {
var fieldVal = $(this).val();
// Change the node's value by removing the fake path (Chrome)
fieldVal = fieldVal.replace("C:\\fakepath\\", "");
if (fieldVal != undefined || fieldVal != "") {
$(this).next(".custom-file-label").attr('data-content', fieldVal);
$(this).next(".custom-file-label").text(fieldVal);
}
})
// F
$('#buttonSim').on('click', function(e) {
e.preventDefault();
$('#inputEtica').prop('disabled', false);
$('#inputJustificativa').prop('disabled', true);
exibirErro('comite');
// $('#anexoJustificativaPreenchido').val("");
});
$('#buttonNao').on('click', function(e) {
e.preventDefault();
$('#inputEtica').prop('disabled', true);
$('#inputJustificativa').prop('disabled', false);
exibirErro('justificativa');
//$('#anexoComitePreenchido').val("");
});
// document.getElementsByClassName('.simPlano .naoPlano').addEventListener("click", function(event){
// event.preventDefault()
// });
$(document).on('click', '.simPlano', function(e) {
e.preventDefault();
var plano = $(this).next().next()[0];
plano.style.display = 'block';
});
$(document).on('click', '.naoPlano', function(e) {
e.preventDefault();
var plano = $(this).next()[0];
plano.style.display = 'none';
});
});
function exibirErro(campo) {
var botao = document.getElementById('botao');
botao.value = "sim";
var comiteErro = document.getElementById('comiteErro');
var justificativaErro = document.getElementById('justificativaErro');
if(comiteErro != null || justificativaErro != null){
if (campo === 'comite') {
comiteErro.style.display = "block";
justificativaErro.style.display = "none";
} else if (campo === 'justificativa') {
comiteErro.style.display = "none";
justificativaErro.style.display = "block";
}
}
}
function habilitarBotao(){
var anexoComitePreenchido = document.getElementById('anexoComitePreenchido');
var anexoJustificativaPreenchido = document.getElementById('anexoJustificativaPreenchido');
if(anexoComitePreenchido.value == "sim"){
$('#inputEtica').prop('disabled', false);
$('#inputJustificativa').prop('disabled', true);
exibirErro('comite');
} else if(anexoJustificativaPreenchido.value == "sim"){
$('#inputEtica').prop('disabled', true);
$('#inputJustificativa').prop('disabled', false);
exibirErro('justificativa');
}
}
// Remover Coautor
// function addModalidade(areaId) {
// console.log(modalidades)
// $("#modalidade").empty();
// 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>")
// }
// }
// }
function montarLinhaInput(valor) {
return `<div id="novoParticipante" style="display: block; margin-top:-1rem">
<div style="background-color: #9FCAEB; margin-left:-20px; margin-right:-20px">
<div class="d-flex justify-content-between align-items-center" style="margin-top: 5px; margin-bottom:4px; margin-left:1px; margin-right:20px">
<div class="container" style="margin-left: 5px; height:40px;">
<h5 style="padding-top:10px; padding-bottom:15px; color:#01487E">Participante</label>
</div>
<div>
<button class="btn btn-danger mt-2 mb-2 delete" style='width:100%;margin-top:10px' disabled>Limite minimo de participantes</button>
</div>
<div class="col-md-12">
<div class="collapse" id="collapseParticipante3">
<div class="container">
<div class="form-row mt-3">
<div class="col-md-12"><h5>Dados do participante</h5></div>
<div class="form-group col-md-6">
<label for="nomeCompletoParticipante3">Nome completo <span style="color: red; font-weight:bold">*</span></label>
<input type="text" class="form-control @error('nomeCompletoParticipante3') is-invalid @enderror" id="nomeCompletoParticipante3" name="nomeParticipante[]" placeholder="Digite o nome completo do participante" required>
@error('nomeCompletoParticipante3')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div>
<h5 class="card-title" style="color: #1492E6; margin-top:1.3rem; margin-bottom:0.7rem">Dados do participante</h5>
<div class="row">
<div class="col-sm-6">
<label>Nome Completo <span style="color: red; font-weight:bold">*</span></label>
<input type="text" id="nomeParticipante${valor}" style="margin-bottom:10px" class="form-control @error('nomeParticipante') is-invalid @enderror" name="nomeParticipante[]" placeholder="Digite o nome do participante" value="{{old('nomeParticipante.'.$i)}}" required>
@error('nomeParticipante.'.$i)
<input type="hidden" name="funcaoParticipante[]" value="4">
<div class="form-group col-md-6">
<label for="email3">E-mail <span style="color: red; font-weight:bold">*</span></label>
<input type="email" class="form-control @error('email3') is-invalid @enderror" id="email3" name="emailParticipante[]" placeholder="Digite o e-mail do participante" required>
@error('email3')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="col-sm-6">
<label>E-mail <span style="color: red; font-weight:bold">*</span></label>
<input type="email" style="margin-bottom:10px" class="form-control @error('emailParticipante') is-invalid @enderror" name="emailParticipante[]" placeholder="Digite o e-mail do participante" value="{{old('emailParticipante.'.$i)}}" required>
@error('emailParticipante.'.$i)
<div class="form-group col-md-6">
<label for="data3">Data de nascimento <span style="color: red; font-weight:bold">*</span></label>
<input type="date" class="form-control @error('data3') is-invalid @enderror" id="data3" name="data_de_nascimento[]" required>
@error('data3')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="col-sm-3">
<input type="hidden" name="funcaoParticipante[]" value="4">
<div class="form-group col-md-6">
<label for="cpf3">CPF <span style="color: red; font-weight:bold">*</span></label>
<input type="text" class="form-control @error('cpf3') is-invalid @enderror" id="cpf3" name="cpf[]" placeholder="Digite o CPF do participante" required>
@error('cpf3')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div>
<div id="dados_complemento_1">
<div class="form-group">
<div class="row">
<div class="col-sm-3" style="margin-top: 5px">
<label for="">{{ __('Data de nascimento') }} <span style="color: red; font-weight:bold">*</span></label>
<input type="date" class="form-control" name="data_de_nascimento[]" required>
</div>
<div class="col-sm-3" style="margin-top: 5px">
<label for="">{{ __('CPF') }} <span style="color: red; font-weight:bold">*</span></label>
<input type="text" class="form-control cpf${valor}" id="cpf${valor}" minlength="14" maxlength="14" onkeyup="verificaCampos(this, 'cpf')" placeholder="000.000.000-00" name="cpf[]" required>
<span id="idAvisoCpfParticipantecpf${valor}" class="invalid-feedback" role="alert" style="overflow: visible; display:none">
<strong>Preencha o campo neste formato 000.000.000-00</strong>
</span>
</div>
<div class="col-sm-3" style="margin-top: 5px">
<label for="">{{ __('RG') }} <span style="color: red; font-weight:bold">*</span></label>
<input type="text" class="form-control rg${valor}" id="rg${valor}" onkeyup="verificaCampos(this, 'rg')" placeholder="00.000.000-0" name="rg[]" required>
<span id="idAvisoRgParticipanterg${valor}" class="invalid-feedback" role="alert" style="overflow: visible; display:none">
<strong>Preencha o campo com números</strong>
</span>
</div>
<div class="col-sm-3" style="margin-top: 5px">
<label for="">{{ __('Celular') }} <span style="color: red; font-weight:bold">*</span></label>
<input type="text" class="form-control celular${valor}" id="celular${valor}" onkeyup="verificaCampos(this, 'celular')" placeholder="(00) 00000-0000" name="celular[]" required>
<span id="idAvisoCelularParticipantecelular${valor}" class="invalid-feedback" role="alert" style="overflow: visible; display:none">
</div>
</div>
<div class="form-group col-md-6">
<label for="rg3">RG <span style="color: red; font-weight:bold">*</span></label>
<input type="text" class="form-control @error('rg3') is-invalid @enderror" id="rg3" name="rg[]" placeholder="Digite o RG do participante" required>
@error('rg3')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="form-group">
<div class="row">
<div class="container">
<h5 style="color: #1492E6; margin-top:0.5rem; margin-bottom:-0.2rem">Endereço do participante</h5>
</div>
</div>
<div class="row">
<div class="col-sm-6" style="margin-top: 15px">
<label for="">{{ __('CEP') }} <span style="color: red; font-weight:bold">*</span></label>
<input type="text" class="form-control" placeholder="Digite o CEP do participante" name="cep[]" required>
</div>
<div class="col-sm-6" style="margin-top: 15px">
<label for="">{{ __('Estado') }} <span style="color: red; font-weight:bold">*</span></label>
<select name="uf[]" id="" class="form-control" required>
<option value="" disabled selected>-- Selecione o estado --</option>
<option @if(old('uf') == 'AC') selected @endif value="AC">Acre</option>
<option @if(old('uf') == 'AL') selected @endif value="AL">Alagoas</option>
<option @if(old('uf') == 'AP') selected @endif value="AP">Amapá</option>
<option @if(old('uf') == 'AM') selected @endif value="AM">Amazonas</option>
<option @if(old('uf') == 'BA') selected @endif value="BA">Bahia</option>
<option @if(old('uf') == 'CE') selected @endif value="CE">Ceará</option>
<option @if(old('uf') == 'DF') selected @endif value="DF">Distrito Federal</option>
<option @if(old('uf') == 'ES') selected @endif value="ES">Espírito Santo</option>
<option @if(old('uf') == 'GO') selected @endif value="GO">Goiás</option>
<option @if(old('uf') == 'MA') selected @endif value="MA">Maranhão</option>
<option @if(old('uf') == 'MT') selected @endif value="MT">Mato Grosso</option>
<option @if(old('uf') == 'MS') selected @endif value="MS">Mato Grosso do Sul</option>
<option @if(old('uf') == 'MG') selected @endif value="MG">Minas Gerais</option>
<option @if(old('uf') == 'PA') selected @endif value="PA">Pará</option>
<option @if(old('uf') == 'PB') selected @endif value="PB">Paraíba</option>
<option @if(old('uf') == 'PR') selected @endif value="PR">Paraná</option>
<option @if(old('uf') == 'PE') selected @endif value="PE">Pernambuco</option>
<option @if(old('uf') == 'PI') selected @endif value="PI">Piauí</option>
<option @if(old('uf') == 'RJ') selected @endif value="RJ">Rio de Janeiro</option>
<option @if(old('uf') == 'RN') selected @endif value="RN">Rio Grande do Norte</option>
<option @if(old('uf') == 'RS') selected @endif value="RS">Rio Grande do Sul</option>
<option @if(old('uf') == 'RO') selected @endif value="RO">Rondônia</option>
<option @if(old('uf') == 'RR') selected @endif value="RR">Roraima</option>
<option @if(old('uf') == 'SC') selected @endif value="SC">Santa Catarina</option>
<option @if(old('uf') == 'SP') selected @endif value="SP">São Paulo</option>
<option @if(old('uf') == 'SE') selected @endif value="SE">Sergipe</option>
<option @if(old('uf') == 'TO') selected @endif value="TO">Tocantins</option>
</select>
</div>
</div>
<div class="form-group col-md-6">
<label for="celular3">Celular <span style="color: red; font-weight:bold">*</span></label>
<input type="text" class="form-control @error('celular3') is-invalid @enderror" id="celular3" name="celular[]" placeholder="Digite o telefone do participante" required>
@error('celular3')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="form-group">
<div class="row">
<div class="col-sm-6" style="">
<label for="">{{ __('Cidade') }} <span style="color: red; font-weight:bold">*</span></label>
<input type="text" class="form-control " placeholder="Digite o nome da cidade" name="cidade[]" required>
</div>
<div class="col-sm-6" style="">
<label for="">{{ __('Bairro') }} <span style="color: red; font-weight:bold">*</span></label>
<input type="text" class="form-control" placeholder="Digite o nome do bairro" name="bairro[]" required>
</div>
<div class="col-sm-6" style="margin-top: 15px">
<label for="">{{ __('Rua') }} <span style="color: red; font-weight:bold">*</span></label>
<input type="text" class="form-control" placeholder="Digite o nome da rua" name="rua[]" required>
</div>
<div class="col-sm-6" style="margin-top: 15px">
<label for="">{{ __('Número') }} <span style="color: red; font-weight:bold">*</span></label>
<input type="text" class="form-control" placeholder="Digite o nome da rua" name="numero[]" required>
</div>
</div>
<div class="col-md-12"><h5>Endereço</h5></div>
<div class="form-group col-md-6">
<label for="cep3">CEP <span style="color: red; font-weight:bold">*</span></label>
<input type="text" class="form-control @error('cep3') is-invalid @enderror" id="cep3" name="cep[]" placeholder="Digite o CEP do participante" required>
@error('cep3')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="form-group">
<div class="row">
<div class="col-sm-12">
<label for="">{{ __('Complemento') }} <span style="color: red; font-weight:bold">*</span></label>
<textarea type="text" class="form-control" placeholder="Apartamento, casa, sítio..." name="complemento[]" required></textarea>
</div>
</div>
<div class="form-group col-md-6">
<label for="estado3">Estado <span style="color: red; font-weight:bold">*</span></label>
<select name="uf[]" id="estado3" class="form-control" style="visibility: visible" required>
<option value="" disabled selected>-- Selecione o estado --</option>
<option @if(old('uf') == 'AC') selected @endif value="AC">Acre</option>
<option @if(old('uf') == 'AL') selected @endif value="AL">Alagoas</option>
<option @if(old('uf') == 'AP') selected @endif value="AP">Amapá</option>
<option @if(old('uf') == 'AM') selected @endif value="AM">Amazonas</option>
<option @if(old('uf') == 'BA') selected @endif value="BA">Bahia</option>
<option @if(old('uf') == 'CE') selected @endif value="CE">Ceará</option>
<option @if(old('uf') == 'DF') selected @endif value="DF">Distrito Federal</option>
<option @if(old('uf') == 'ES') selected @endif value="ES">Espírito Santo</option>
<option @if(old('uf') == 'GO') selected @endif value="GO">Goiás</option>
<option @if(old('uf') == 'MA') selected @endif value="MA">Maranhão</option>
<option @if(old('uf') == 'MT') selected @endif value="MT">Mato Grosso</option>
<option @if(old('uf') == 'MS') selected @endif value="MS">Mato Grosso do Sul</option>
<option @if(old('uf') == 'MG') selected @endif value="MG">Minas Gerais</option>
<option @if(old('uf') == 'PA') selected @endif value="PA">Pará</option>
<option @if(old('uf') == 'PB') selected @endif value="PB">Paraíba</option>
<option @if(old('uf') == 'PR') selected @endif value="PR">Paraná</option>
<option @if(old('uf') == 'PE') selected @endif value="PE">Pernambuco</option>
<option @if(old('uf') == 'PI') selected @endif value="PI">Piauí</option>
<option @if(old('uf') == 'RJ') selected @endif value="RJ">Rio de Janeiro</option>
<option @if(old('uf') == 'RN') selected @endif value="RN">Rio Grande do Norte</option>
<option @if(old('uf') == 'RS') selected @endif value="RS">Rio Grande do Sul</option>
<option @if(old('uf') == 'RO') selected @endif value="RO">Rondônia</option>
<option @if(old('uf') == 'RR') selected @endif value="RR">Roraima</option>
<option @if(old('uf') == 'SC') selected @endif value="SC">Santa Catarina</option>
<option @if(old('uf') == 'SP') selected @endif value="SP">São Paulo</option>
<option @if(old('uf') == 'SE') selected @endif value="SE">Sergipe</option>
<option @if(old('uf') == 'TO') selected @endif value="TO">Tocantins</option>
</select>
</div>
<div class="form-group">
<div class="row">
<div class="container">
<h5 style="color: #1492E6; margin-top:0.5rem; margin-bottom:0.7rem">Dados do curso do participante</h5>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<label for="">{{ __('Universidade') }} <span style="color: red; font-weight:bold">*</span></label>
<input type="text" class="form-control" placeholder="Digite o nome da universidade" name="universidade[]" required>
</div>
<div class="col-sm-6">
<label for="">{{ __('Curso') }} <span style="color: red; font-weight:bold">*</span></label>
<input type="text" class="form-control" placeholder="Digite o nome do curso" name="curso[]" required>
</div>
<div class="col-sm-6">
<label for="">{{ __('Turno') }} <span style="color: red; font-weight:bold">*</span></label>
<select id="" class="form-control" name="turno[]" required>
<option value="" disabled selected>-- TURNO --</option>
@foreach ($enum_turno as $turno)
<option value="{{$turno}}">{{$turno}}</option>
@endforeach
</select>
</div>
</div>
<div class="form-group col-md-6">
<label for="cidade3">Cidade <span style="color: red; font-weight:bold">*</span></label>
<input type="text" class="form-control @error('cidade3') is-invalid @enderror" id="cidade3" name="cidade[]" placeholder="Digite o e-mail do participante" required>
@error('cidade3')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="form-group" style="margin-bottom: 2rem">
<div class="row">
<div class="col-sm-3">
<label for="">{{ __('Total de períodos do curso') }} <span style="color: red; font-weight:bold">*</span></label>
<select name="total_periodos[]" id="" class="form-control" onchange="gerarPeriodos(this)" required>
<option value="" disabled selected>-- TOTAL DE PERIODOS --</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
</select>
</div>
<div class="col-sm-3">
<label for="">{{ __('Período atual') }} <span style="color: red; font-weight:bold">*</span></label>
<select name="periodo_cursado[]" id="" class="form-control" required>
<option value="" disabled selected>-- PERÍODO ATUAL --</option>
</select>
</div>
<div class="col-sm-3">
<label for="">{{ __('Ordem de prioridade') }} <span style="color: red; font-weight:bold">*</span></label>
<select name="ordem_prioridade[]" id="" class="form-control" required>
<option value="" disabled selected>-- ORDEM --</option>
<option value="1">1º</option>
<option value="2">2º</option>
<option value="3">3º</option>
<option value="4">4º</option>
</select>
</div>
<div class="col-sm-3">
<label for="">{{ __('Coeficiente de rendimento') }} <span style="color: red; font-weight:bold">*</span></label>
<input type="number" class="form-control media" min="0" max="10" step="0.01" value="00.00" name="media_geral_curso[]" required>
</div>
<div class="col-sm-12">
<div class="row">
<div class="container">
<h5 style="color: #1492E6; margin-top:1.5rem; margin-bottom:0.7rem">Plano de trabalho</h5>
</div>
</div>
</div>
<div class="col-sm-6">
<label>Titulo <span style="color: red; font-weight:bold">*</span></label>
<input type="text" style="margin-bottom:10px" class="form-control @error('nomePlanoTrabalho') is-invalid @enderror" name="nomePlanoTrabalho[]" placeholder="Digite o título do plano de trabalho" value="{{old('nomePlanoTrabalho.'.$i)}}" required>
@error('nomePlanoTrabalho')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="col-sm-6">
<div class="custom-file">
<label for="nomeTrabalho">Anexo <span style="color: red; font-weight:bold">*</span></label>
<div class="input-group">
<div class="custom-file">
<input type="file" class="custom-file-input @error('anexoPlanoTrabalho') is-invalid @enderror" id="anexoPlanoTrabalho" aria-describedby="anexoPlanoTrabalho" name="anexoPlanoTrabalho[]" onchange="verificarArquivoAnexado_pdf(this)" required>
<label class="custom-file-label" id="custom-file-label" for="inputGroupFile01">O arquivo deve ser no formato PDF de até 2MB.</label>
</div>
</div>
@error('anexoPlanoTrabalho')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div>
<div class="form-group col-md-6">
<label for="bairro3">Bairro <span style="color: red; font-weight:bold">*</span></label>
<input type="text" class="form-control @error('bairro3') is-invalid @enderror" id="bairro3" name="bairro[]" placeholder="Digite o nome do bairro" required>
@error('bairro3')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="form-group col-md-6">
<label for="rua3">Rua <span style="color: red; font-weight:bold">*</span></label>
<input type="text" class="form-control @error('rua3') is-invalid @enderror" id="rua3" name="rua[]" placeholder="Digite o nome da avenida, rua, travessa..."required>
@error('rua3')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="form-group col-md-6">
<label for="numero3">Número <span style="color: red; font-weight:bold">*</span></label>
<input type="text" class="form-control @error('numero3') is-invalid @enderror" id="numero3" name="numero[]" placeholder="Digite o número"required>
@error('numero3')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="form-group col-md-12">
<label for="complemento3">Complemento <span style="color: red; font-weight:bold">*</span></label>
<textarea type="text" class="form-control @error('complemento3') is-invalid @enderror" id="complemento3" name="complemento[]" placeholder="Apartamento, casa, sítio..."required></textarea>
@error('complemento3')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="col-md-12"><h5>Dados do curso</h5></div>
<div class="form-group col-md-12">
<label for="universidade3">Universidade <span style="color: red; font-weight:bold">*</span></label>
<input type="text" class="form-control @error('universidade3') is-invalid @enderror" id="universidade3" name="universidade[]" placeholder="Email" required>
@error('universidade3')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="form-group col-md-12">
<label for="curso3">Curso <span style="color: red; font-weight:bold">*</span></label>
<input type="text" class="form-control @error('curso3') is-invalid @enderror" id="curso3" name="curso[]" placeholder="Password" required>
@error('curso3')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="form-group col-md-6">
<label for="turno3">Turno <span style="color: red; font-weight:bold">*</span></label>
<select id="turno3" class="form-control" required name="turno[]"
<option value="" disabled selected>-- TURNO --</option>
@foreach ($enum_turno as $turno)
<option value="{{$turno}}">{{$turno}}</option>
@endforeach
</select>
</div>
<div class="form-group col-md-6">
<label for="totalDePeriodos3">{{ __('Total de períodos do curso') }} <span style="color: red; font-weight:bold">*</span></label>
<select name="total_periodos[]" id="totalDePeriodos3" class="form-control" onchange="gerarPeriodos1(this)" required>
<option value="" disabled selected>-- TOTAL DE PERIODOS --</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
</select>
</div>
<div class="form-group col-md-6">
<label for="periodoAtual3">{{ __('Período atual') }} <span style="color: red; font-weight:bold">*</span></label>
<select name="periodo_cursado[]" id="periodoAtual3" class="form-control" required>
<option value="" disabled selected>-- PERÍODO ATUAL --</option>
</select>
</div>
<div class="form-group col-md-6">
<label for="ordemDePrioridade3">{{ __('Ordem de prioridade') }} <span style="color: red; font-weight:bold">*</span></label>
<select name="ordem_prioridade[]" id="ordemDePrioridade3" class="form-control" required>
<option value="" disabled selected>-- ORDEM --</option>
<option value="1">1º</option>
<option value="2">2º</option>
<option value="3">3º</option>
</select>
</div>
<div class="form-group col-md-6">
<label for="coeficienteDeRendimento3">Coeficiente de rendimento <span style="color: red; font-weight:bold">*</span></label>
<input type="number" class="form-control media" id="coeficienteDeRendimento3" min="0" max="10" step="0.01" value="00.00" name="media_geral_curso[]" required>
@error('coeficienteDeRendimento3')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="col-md-12"><h5>Plano de trabalho</h5></div>
<div class="form-group col-md-6">
<label for="titulo3">Título <span style="color: red; font-weight:bold">*</span></label>
<input type="text" class="form-control @error('titulo3') is-invalid @enderror" id="titulo3" name="nomePlanoTrabalho[]" placeholder="Digite o título do plano de trabalho" required>
@error('titulo3')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="form-group col-md-6">
<label for="anexoPlanoDeTrabalho3">Anexo <span style="color: red; font-weight:bold">*</span></label>
<div class="custom-file">
<input type="file" class="custom-file-input @error('anexoPlanoTrabalho3') is-invalid @enderror" id="anexoPlanoDeTrabalho3" aria-describedby="anexoPlanoTrabalho" name="anexoPlanoTrabalho[]" onchange="verificarArquivoAnexado_pdf(this)" required>
<label class="custom-file-label" id="anexoPlanoDeTrabalho1" for="inputGroupFile01">O arquivo deve ser no formato PDF de até 2MB.</label>
</div>
@error('anexoPlanoDeTrabalho3')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div>
</div>`;
}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!--X Participantes X-->
<!-- Finalizar -->
<div class="col-md-10" style="text-align: center; margin-top:2rem"><h4 style="margin-top: 1rem;">5º Passo</h4></div>
<div class="col-md-10" style="text-align: center;"><h5 style="margin-bottom:1rem;color:#909090">Finalizar</h5></div>
<div class="col-md-10">
<div class="card" style="border-radius: 12px">
<div class="card-body">
<div class="container">
<div class="form-row mt-3">
<div class="col-md-12"><h5 style="color: #1492E6; margin-bottom:-0.4rem">Finalizar</h5></div>
<div class="col-md-12" style="margin-bottom: -0.8rem;"><hr style="border-top: 1px solid#1492E6"></div>
</div>
<div class=" d-flex justify-content-between align-items-center" style="margin-top: 15px; margin-bottom:18px">
<h6 style="font-family:Arial, Helvetica, sans-serif; margin-right:15px"><span style="color: red; font-weight:bold">*</span> Campos obrigatórios</h6>
<button type="submit" id="clickSubmitForm" style="display: none"></button>
<button type="button" class="btn btn-success" id="idButtonSubmitProjeto" onclick="enviarModalenviarProjeto()" disabled>{{ __('Enviar Projeto') }}</button>
</div>
</div>
</div>
</div>
</div>
<!--X Finalizar X-->
</div>
</div>
</form>
<!-- Modal de Aviso Edit -->
<div class="modal fade" id="exampleModalAnexarDocumento" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel2" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header" id="idCorCabecalhoModalDocumento">
<h5 class="modal-title" id="exampleModalLabel2" style="font-size:20px; margin-top:7px; color:white; font-weight:bold; font-family: 'Roboto', sans-serif;">Aviso</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<div class="row">
<div class="col-12" style="font-family: 'Roboto', sans-serif;"><label id="idTituloDaMensagemModalDocumento"></label></div>
<div class="col-12" style="font-family: 'Roboto', sans-serif; margin-top:10px;">
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-light" data-dismiss="modal"style="width:200px;">Fechar</button>
</div>
</div>
</div>
</div>
<!-- Modal -->
<div class="modal fade" id="modalSubmit" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLongTitle">Modal title</h5>
<button type="button" class="close" onclick="fecharModalenviarProjeto()">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
...
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" onclick="fecharModalenviarProjeto()">Close</button>
<button type="button" class="btn btn-primary" onclick="enviarModalenviarProjeto()">Enviar projeto</button>
</div>
</div>
</div>
</div>
</div>
@endsection
@section('javascript')
<script type="text/javascript">
/*
* GLOBAL
*/
var numeroDeParticipantes;
var tempPart1;
var tempPart2;
var tempPart3;
tempPart1 = document.getElementById("participante1");
tempPart2 = document.getElementById("participante2");
tempPart3 = document.getElementById("participante3");
window.onload = areas();
function areas() {
/*
* FUNCAO: Mostrar no input o arquivo selecionado
*
*/
$('.custom-file-input').on('change', function() {
var fieldVal = $(this).val();
// Change the node's value by removing the fake path (Chrome)
fieldVal = fieldVal.replace("C:\\fakepath\\", "");
if (fieldVal != undefined || fieldVal != "") {
$(this).next(".custom-file-label").attr('data-content', fieldVal);
$(this).next(".custom-file-label").text(fieldVal);
}
})
/*
* FUNCAO: Gerar as areas
*
*/
function areas() {
var grandeArea = $('#grandeArea').val();
$.ajax({
type: 'POST',
......@@ -1075,8 +1271,11 @@
})
}
function subareas() {
/*
* FUNCAO: Gerar as subareas
*
*/
function subareas() {
var area = $('#area').val();
$.ajax({
type: 'POST',
......@@ -1110,80 +1309,11 @@
})
}
function exibirAnexoTemp(file){
if(file.id === "anexoProjeto"){
var anexoProjetoPreenchido = document.getElementById('anexoProjetoPreenchido');
anexoProjetoPreenchido.value = "sim";
}
if(file.id === "anexoLattesCoordenador"){
var anexoLattesPreenchido = document.getElementById('anexoLattesPreenchido');
anexoLattesPreenchido.value = "sim";
}
if(file.id === "inputEtica"){
var anexoComitePreenchido = document.getElementById('anexoComitePreenchido');
var anexoJustificativaPreenchido = document.getElementById('anexoJustificativaPreenchido');
anexoComitePreenchido.value = "sim";
anexoJustificativaPreenchido.value = "";
}
if(file.id === "inputJustificativa"){
var anexoComitePreenchido = document.getElementById('anexoComitePreenchido');
var anexoJustificativaPreenchido = document.getElementById('anexoJustificativaPreenchido');
anexoJustificativaPreenchido.value = "sim";
anexoComitePreenchido.value = "";
}
if(file.id === "anexoCONSU"){
var anexoConsuPreenchido = document.getElementById('anexoConsuPreenchido');
anexoConsuPreenchido.value = "sim";
}
if(file.id === "anexoPlanilha"){
var anexoPlanilhaPreenchido = document.getElementById('anexoPlanilhaPreenchido');
anexoPlanilhaPreenchido.value = "sim";
}
}
function removerPlanilha(){
console.log('a');
$('#anexoPlanilhaPreenchido').val("");
}
window.onload = areas();
window.onload = habilitarBotao();
$(document).ready(aplicarMascaras());
function aplicarMascaras() {
$('.cpf').mask('000.000.000-00');
var SPMaskBehavior = function(val) {
return val.replace(/\D/g, '').length === 11 ? '(00) 00000-0000' : '(00) 0000-00009';
},
spOptions = {
onKeyPress: function(val, e, field, options) {
field.mask(SPMaskBehavior.apply({}, arguments), options);
}
};
$('.celular').mask(SPMaskBehavior, spOptions);
$('.rg').mask('99.999.999-9');
$('.media').mask('00.00');
}
function gerarPeriodos(select) {
var div = select.parentElement.parentElement;
var selectPeriodos = div.children[1].children[1];
var html = `<option value="" disabled selected>-- TOTAL DE PERIODOS --</option>`;
for(var i = 0; i < parseInt(select.value); i++) {
html += `<option value="${i+1}">${i+1}º</option>`;
}
$(selectPeriodos).html('');
$(selectPeriodos).append(html);
}
/*
* FUNCAO: funcao responsavel pelo abre e fecha da area "possui autorizacoes especiais?"
*
*/
function displayAutorizacoesEspeciais(valor){
function displayAutorizacoesEspeciais(valor){
if(valor == "sim"){
document.getElementById("radioSim").checked = true;
document.getElementById("radioNao").checked = false;
......@@ -1198,12 +1328,11 @@
document.getElementById("idAvisoAutorizacaoEspecial").style.display = "none";
}
}
/*
* FUNCAO: funcao responsavel pela verificacao dos arquivos anexados (PDF)
*
*/
function verificarArquivoAnexado_pdf(item){
function verificarArquivoAnexado_pdf(item){
if(item.files[0].type.split('/')[1] != "pdf"){
document.getElementById("idCorCabecalhoModalDocumento").style.backgroundColor = "red";
......@@ -1217,8 +1346,7 @@
$("#exampleModalAnexarDocumento").modal({show: true});
}
}
/*
* FUNCAO: funcao responsavel pela verificacao dos arquivos anexados (XLS, XLSX, ODS)
/* FUNCAO: funcao responsavel pela verificacao dos arquivos anexados (XLS, XLSX, ODS)
*
*/
function verificarArquivoAnexado_xls_xlsx_ods(item){
......@@ -1237,48 +1365,632 @@ function verificarArquivoAnexado_xls_xlsx_ods(item){
}
}
/* FUNCAO: validar formulario
/*
* FUNCAO: Gerar periodos
*
*/
function gerarPeriodos1(select) {
var div = select.parentElement.parentElement;
var selectPeriodos = div.children[21].children[1];
var html = `<option value="" disabled selected>-- TOTAL DE PERIODOS --</option>`;
for(var i = 0; i < parseInt(select.value); i++) {
html += `<option value="${i+1}">${i+1}º</option>`;
}
$(selectPeriodos).html('');
$(selectPeriodos).append(html);
}
/*
* FUNCAO: Selecionar participantes do projeto
*
*/
function selecionarParticipantes(quantidade){
if(quantidade == "1"){
numeroDeParticipantes = 1;
document.getElementById("participante1").style.display ="block";
document.getElementById("participante2").remove();
document.getElementById("participante3").remove();
document.getElementById("selecaoParticipantes").style.display ="none";
}else if(quantidade == 2){
numeroDeParticipantes = 2;
document.getElementById("participante1").style.display ="block";
document.getElementById("participante2").style.display ="block";
document.getElementById("participante3").remove();
document.getElementById("selecaoParticipantes").style.display ="none";
}else if(quantidade == 3){
numeroDeParticipantes = 3;
document.getElementById("participante1").style.display ="block";
document.getElementById("participante2").style.display ="block";
document.getElementById("participante3").style.display ="block";
document.getElementById("selecaoParticipantes").style.display ="none";
}
//mostrar botao alterar
document.getElementById("dropdownMenuButtonAlterar").style.display = "block";
// habilitar botao submeter projeto
document.getElementById("idButtonSubmitProjeto").disabled = false;
}
/*
* FUNCAO: abrir modal para enviar o trabalho
*/
function abrirModalenviarProjeto(){
if(validarForm() == true){
//fecharModalenviarProjeto();
}else{
document.getElementById("modalSubmit").classList.add("show");
document.getElementById("modalSubmit").style.display="block";
document.getElementById("modalSubmit").style.backgroundColor="rgba(0, 0, 0, 0.5)";
document.getElementById("collapseParticipante1").classList.add("show");
document.getElementById("collapseParticipante2").classList.add("show");
document.getElementById("collapseParticipante3").classList.add("show");
}
}
/*
* FUNCAO: fechar modal para enviar o trabalho
*/
function fecharModalenviarProjeto(){
document.getElementById("modalSubmit").classList.remove("show");
document.getElementById("modalSubmit").style.display="none";
document.getElementById("modalSubmit").style.backgroundColor="rgba(0, 0, 0, 0.5)";
//document.getElementById("collapseParticipante1").classList.remove("show");
//document.getElementById("collapseParticipante2").classList.remove("show");
//document.getElementById("collapseParticipante3").classList.remove("show");
}
/*
* FUNCAO: enviar modal
*
*/
function enviarModalenviarProjeto(){
if(numeroDeParticipantes == 1){
document.getElementById("collapseParticipante1").classList.add("show");
document.getElementById("clickSubmitForm").click();
}else if(numeroDeParticipantes == 2){
document.getElementById("collapseParticipante1").classList.add("show");
document.getElementById("collapseParticipante2").classList.add("show");
document.getElementById("clickSubmitForm").click();
}else if(numeroDeParticipantes == 3){
document.getElementById("collapseParticipante1").classList.add("show");
document.getElementById("collapseParticipante2").classList.add("show");
document.getElementById("collapseParticipante3").classList.add("show");
document.getElementById("clickSubmitForm").click();
}
}
/*
* FUNCAO: Formacao dos participantes
*
*/
function alterarFormacao(quero){
//console.log(numeroDeParticipantes);
if(numeroDeParticipantes == 1 && quero == 2){
var container = document.getElementById("posicaoParticipante2");
container.append(tempPart2);
document.getElementById("participante2").style.display ="block";
numeroDeParticipantes = quero;
}else if(numeroDeParticipantes == 1 && quero == 3){
var container2 = document.getElementById("posicaoParticipante2");
container2.append(tempPart2);
var container3 = document.getElementById("posicaoParticipante3");
container3.append(tempPart3);
document.getElementById("participante2").style.display ="block";
document.getElementById("participante3").style.display ="block";
numeroDeParticipantes = quero;
}else if(numeroDeParticipantes == 2 && quero == 1){
document.getElementById("participante1").style.display ="block";
document.getElementById("participante2").remove();
numeroDeParticipantes = quero;
}else if(numeroDeParticipantes == 2 && quero == 3){
var container3 = document.getElementById("posicaoParticipante3");
container3.append(tempPart3);
document.getElementById("participante3").style.display ="block";
numeroDeParticipantes = quero;
}else if(numeroDeParticipantes == 3 && quero == 1){
document.getElementById("participante1").style.display ="block";
document.getElementById("participante2").remove();
document.getElementById("participante3").remove();
numeroDeParticipantes = quero;
}else if(numeroDeParticipantes == 3 && quero == 2){
document.getElementById("participante1").style.display ="block";
document.getElementById("participante3").remove();
numeroDeParticipantes = quero;
}
}
/* FUNCAO: validar campos
*
*/
$(document).ready(aplicarMascaras());
function aplicarMascaras() {
$('#cpf1').mask('000.000.000-00');
$('#cpf2').mask('000.000.000-00');
$('#cpf3').mask('000.000.000-00');
$('#rg1').mask('00000000');
$('#rg2').mask('00000000');
$('#rg3').mask('00000000');
$('#celular1').mask('(00) 00000-0000');
$('#celular2').mask('(00) 00000-0000');
$('#celular3').mask('(00) 00000-0000');
$('#cep1').mask('00000-000');
$('#cep2').mask('00000-000');
$('#cep3').mask('00000-000');
}
function validarForm(){
var buttonRadioSim = document.getElementById("radioSim");
/*var buttonRadioSim = document.getElementById("radioSim");
var buttonRadioNao = document.getElementById("radioNao");
//button radio
if(buttonRadioSim.checked == false && buttonRadioNao.checked == false){
document.getElementById("idAvisoAutorizacaoEspecial").style.display = "block";
}
}
var novoRG = "";
function verificaCampos(input, tipo){
if(tipo == "cpf"){
var regExp = /^\d{3}\.\d{3}\.\d{3}\-\d{2}$/g;
if(regExp.test(input.value) == false){
document.getElementById(input.id).style.borderColor = "red";
document.getElementById("idAvisoCpfParticipante"+input.id).style.display="block";
}else{
document.getElementById(input.id).style.borderColor = "#c6c8ca";
document.getElementById("idAvisoCpfParticipante"+input.id).style.display="none";
}
}else if(tipo == "rg"){
var regExp = /[0-9]$/g;
if(regExp.test(input.value) == false){
document.getElementById(input.id).style.borderColor = "red";
document.getElementById("idAvisoRgParticipante"+input.id).style.display="block";
}else{
document.getElementById(input.id).style.borderColor = "#c6c8ca";
document.getElementById("idAvisoRgParticipante"+input.id).style.display="none";
}
document.getElementById("idAvisoAutorizacaoEspecial").autofocus;
}
}
//participantes
var part1 = document.getElementById("participante1").style.visibility;
var part2 = document.getElementById("participante1").style.visibility;
var part3 = document.getElementById("participante1").style.visibility;
*/
function isNumber(n) {
return !isNaN(parseFloat(n)) && isFinite(n);
}
/*
document.getElementById("modalSubmit").classList.add("show");
document.getElementById("modalSubmit").style.display="block";
document.getElementById("modalSubmit").style.backgroundColor="black";
document.getElementById("collapseParticipante1").classList.add("show");
document.getElementById("collapseParticipante2").classList.add("show");
document.getElementById("collapseParticipante3").classList.add("show");
//document.getElementById("collapseParticipante1").classList.remove = "collapsed";
*/
}
function validarPart1(){
//participante 1
var nome1 = document.getElementById("nomeCompletoParticipante1");
var email1 = document.getElementById("email1");
var data1 = document.getElementById("data1");
var cpf1 = document.getElementById("cpf1");
var rg1 = document.getElementById("rg1");
var celular1 = document.getElementById("celular1");
var cep1 = document.getElementById("cep1");
var estado1 = document.getElementById("estado1");
var cidade1 = document.getElementById("cidade1");
var bairro1 = document.getElementById("bairro1");
var rua1 = document.getElementById("rua1");
var numero1 = document.getElementById("numero1");
var complemento1 = document.getElementById("complemento1");
var universidade1 = document.getElementById("universidade1");
var curso1 = document.getElementById("curso1");
var turno1 = document.getElementById("turno1");
var totalDePeriodos1 = document.getElementById("totalDePeriodos1");
var periodoAtual1 = document.getElementById("periodoAtual1");
var ordemDePrioridade1 = document.getElementById("ordemDePrioridade1");
var coeficineteDeRendimento1 = document.getElementById("coeficienteDeRendimento1");
var tituloPlanoDeTrabalho1 = document.getElementById("titulo1");
var anexoPlanoDeTrabalho1 = document.getElementById("anexoPlanoDeTrabalho1");
//validacao dos campos - participante 1
if(nome1.value == ""){
document.getElementById("collapseParticipante1").classList.add("show");
//alert("Nome não informado");
nome1.focus();
return true;
}else if(email1.value == ""){
document.getElementById("collapseParticipante1").classList.add("show");
//alert("Nome não informado");
email1.focus();
return true;
}else if(data1.value == ""){
document.getElementById("collapseParticipante1").classList.add("show");
//alert("Nome não informado");
data1.focus();
return true;
}else if(cpf1.value == ""){
document.getElementById("collapseParticipante1").classList.add("show");
//alert("Nome não informado");
cpf1.focus();
return true;
}else if(rg1.value == ""){
document.getElementById("collapseParticipante1").classList.add("show");
//alert("Nome não informado");
rg1.focus();
return true;
}else if(celular1.value == ""){
document.getElementById("collapseParticipante1").classList.add("show");
//alert("Nome não informado");
celular1.focus();
return true;
}else if(cep1.value == ""){
document.getElementById("collapseParticipante1").classList.add("show");
//alert("Nome não informado");
cep1.focus();
return true;
}else if(estado1.value == ""){
document.getElementById("collapseParticipante1").classList.add("show");
//alert("Nome não informado");
estado1.focus();
return true;
}else if(cidade1.value == ""){
document.getElementById("collapseParticipante1").classList.add("show");
//alert("Nome não informado");
cidade1.focus();
return true;
}else if(bairro1.value == ""){
document.getElementById("collapseParticipante1").classList.add("show");
//alert("Nome não informado");
bairro1.focus();
return true;
}else if(rua1.value == ""){
document.getElementById("collapseParticipante1").classList.add("show");
//alert("Nome não informado");
rua1.focus();
return true;
}else if(numero1.value == ""){
document.getElementById("collapseParticipante1").classList.add("show");
//alert("Nome não informado");
numero1.focus();
return true;
}else if(complemento1.value == ""){
document.getElementById("collapseParticipante1").classList.add("show");
//alert("Nome não informado");
complemento1.focus();
return true;
}else if(complemento1.value == ""){
document.getElementById("collapseParticipante1").classList.add("show");
//alert("Nome não informado");
complemento1.focus();
return true;
}else if(universidade1.value == ""){
document.getElementById("collapseParticipante1").classList.add("show");
//alert("Nome não informado");
universidade1.focus();
return true;
}else if(curso1.value == ""){
document.getElementById("collapseParticipante1").classList.add("show");
//alert("Nome não informado");
curso1.focus();
return true;
}else if(turno1.value == ""){
document.getElementById("collapseParticipante1").classList.add("show");
//alert("Nome não informado");
turno1.focus();
return true;
}else if(totalDePeriodos1.value == ""){
document.getElementById("collapseParticipante1").classList.add("show");
//alert("Nome não informado");
totalDePeriodos1.focus();
return true;
}else if(periodoAtual1.value == ""){
document.getElementById("collapseParticipante1").classList.add("show");
//alert("Nome não informado");
periodoAtual1.focus();
return true;
}else if(ordemDePrioridade1.value == ""){
document.getElementById("collapseParticipante1").classList.add("show");
//alert("Nome não informado");
ordemDePrioridade1.focus();
return true;
}else if(coeficineteDeRendimento1.value == ""){
document.getElementById("collapseParticipante1").classList.add("show");
//alert("Nome não informado");
coeficineteDeRendimento1.focus();
return true;
}else if(tituloPlanoDeTrabalho1.value == ""){
document.getElementById("collapseParticipante1").classList.add("show");
//alert("Nome não informado");
tituloPlanoDeTrabalho1.focus();
return true;
}else if(anexoPlanoDeTrabalho1.value == ""){
document.getElementById("collapseParticipante1").classList.add("show");
//alert("Nome não informado");
anexoPlanoDeTrabalho1.focus();
return true;
}
}
function validarPart2(){
//participante 2
var nome2 = document.getElementById("nomeCompletoParticipante2");
var email2 = document.getElementById("email2");
var data2 = document.getElementById("data2");
var cpf2 = document.getElementById("cpf2");
var rg2 = document.getElementById("rg2");
var celular2 = document.getElementById("celular2");
var cep2 = document.getElementById("cep2");
var estado2 = document.getElementById("estado2");
var cidade2 = document.getElementById("cidade2");
var bairro2 = document.getElementById("bairro2");
var rua2 = document.getElementById("rua2");
var numero2 = document.getElementById("numero2");
var complemento2 = document.getElementById("complemento2");
var universidade2 = document.getElementById("universidade2");
var curso2 = document.getElementById("curso2");
var turno2 = document.getElementById("turno2");
var totalDePeriodos2 = document.getElementById("totalDePeriodos2");
var periodoAtual2 = document.getElementById("periodoAtual2");
var ordemDePrioridade2 = document.getElementById("ordemDePrioridade2");
var coeficineteDeRendimento2 = document.getElementById("coeficienteDeRendimento2");
var tituloPlanoDeTrabalho2 = document.getElementById("titulo2");
var anexoPlanoDeTrabalho2 = document.getElementById("anexoPlanoDeTrabalho2");
//validacao dos campos - participante 2
if(nome2.value == ""){
document.getElementById("collapseParticipante2").classList.add("show");
//alert("Nome não informado");
nome2.focus();
return true;
} else if(email2.value == ""){
document.getElementById("collapseParticipante2").classList.add("show");
//alert("Nome não informado");
email2.focus();
return true;
}else if(data2.value == ""){
document.getElementById("collapseParticipante2").classList.add("show");
//alert("Nome não informado");
data2.focus();
return true;
}else if(cpf2.value == ""){
document.getElementById("collapseParticipante2").classList.add("show");
//alert("Nome não informado");
cpf2.focus();
return true;
}else if(rg2.value == ""){
document.getElementById("collapseParticipante2").classList.add("show");
//alert("Nome não informado");
rg2.focus();
return true;
}else if(celular2.value == ""){
document.getElementById("collapseParticipante2").classList.add("show");
//alert("Nome não informado");
celular2.focus();
return true;
}else if(cep2.value == ""){
document.getElementById("colapseParticipante2").classList.add("show");
//alert("Nome não informado");
cep2.focus();
return true;
}else if(estado2.value == ""){
document.getElementById("collapseParticipante2").classList.add("show");
//alert("Nome não informado");
estado2.focus();
return true;
}else if(cidade2.value == ""){
console.log(cidade2.value)
document.getElementById("collapseParticipante2").classList.add("show");
//alert("Nome não informado");
cidade2.focus();
return true;
}else if(bairro2.value == ""){
document.getElementById("collapseParticipante2").classList.add("show");
//alert("Nome não informado");
bairro2.focus();
return true;
}else if(rua2.value == ""){
document.getElementById("collapseParticipante2").classList.add("show");
//alert("Nome não informado");
rua2.focus();
return true;
}else if(numero2.value == ""){
document.getElementById("collapseParticipante2").classList.add("show");
//alert("Nome não informado");
numero2.focus();
return true;
}else if(complemento2.value == ""){
document.getElementById("collapseParticipante2").classList.add("show");
//alert("Nome não informado");
complemento2.focus();
return true;
}else if(complemento2.value == ""){
document.getElementById("collapseParticipante2").classList.add("show");
//alert("Nome não informado");
complemento2.focus();
return true;
}else if(universidade2.value == ""){
document.getElementById("collapseParticipante2").classList.add("show");
//alert("Nome não informado");
universidade2.focus();
return true;
}else if(curso2.value == ""){
document.getElementById("collapseParticipante2").classList.add("show");
//alert("Nome não informado");
curso2.focus();
return true;
}else if(turno2.value == ""){
document.getElementById("collapseParticipante2").classList.add("show");
//alert("Nome não informado");
turno2.focus();
return true;
}else if(totalDePeriodos2.value == ""){
document.getElementById("collapseParticipante2").classList.add("show");
//alert("Nome não informado");
totalDePeriodos2.focus();
return true;
}else if(periodoAtual2.value == ""){
document.getElementById("collapseParticipante2").classList.add("show");
//alert("Nome não informado");
periodoAtual2.focus();
return true;
}else if(ordemDePrioridade2.value == ""){
document.getElementById("collapseParticipante2").classList.add("show");
//alert("Nome não informado");
ordemDePrioridade2.focus();
return true;
}else if(coeficineteDeRendimento2.value == ""){
document.getElementById("collapseParticipante2").classList.add("show");
//alert("Nome não informado");
coeficineteDeRendimento2.focus();
return true;
}else if(tituloPlanoDeTrabalho2.value == ""){
document.getElementById("collapseParticipante2").classList.add("show");
//alert("Nome não informado");
tituloPlanoDeTrabalho2.focus();
return true;
}else if(anexoPlanoDeTrabalho2.value == ""){
document.getElementById("collapseParticipante2").classList.add("show");
//alert("Nome não informado");
anexoPlanoDeTrabalho2.focus();
return true;
}
}
function validarPart3(){
//participante 3
var nome3 = document.getElementById("nomeCompletoParticipante3");
var email3 = document.getElementById("email3");
var data3 = document.getElementById("data3");
var cpf3 = document.getElementById("cpf3");
var rg3 = document.getElementById("rg3");
var celular3 = document.getElementById("celular3");
var cep3 = document.getElementById("cep3");
var estado3 = document.getElementById("estado3");
var cidade3 = document.getElementById("cidade3");
var bairro3 = document.getElementById("bairro3");
var rua3 = document.getElementById("rua3");
var numero3 = document.getElementById("numero3");
var complemento3 = document.getElementById("complemento3");
var universidade3 = document.getElementById("universidade3");
var curso3 = document.getElementById("curso3");
var turno3 = document.getElementById("turno3");
var totalDePeriodos3 = document.getElementById("totalDePeriodos3");
var periodoAtual3 = document.getElementById("periodoAtual3");
var ordemDePrioridade3 = document.getElementById("ordemDePrioridade3");
var coeficineteDeRendimento3 = document.getElementById("coeficienteDeRendimento3");
var tituloPlanoDeTrabalho3 = document.getElementById("titulo3");
var anexoPlanoDeTrabalho3 = document.getElementById("anexoPlanoDeTrabalho3");
//validacao dos campos - participante 3
if(nome3.value == ""){
document.getElementById("collapseParticipante3").classList.add("show");
//alert("Nome não informado");
nome3.focus();
return true;
}else if(email3.value == ""){
document.getElementById("collapseParticipante3").classList.add("show");
//alert("Nome não informado");
email3.focus();
return true;
}else if(data3.value == ""){
document.getElementById("collapseParticipante3").classList.add("show");
//alert("Nome não informado");
data3.focus();
return true;
}else if(cpf3.value == ""){
document.getElementById("collapseParticipante3").classList.add("show");
//alert("Nome não informado");
cpf3.focus();
return true;
}else if(rg3.value == ""){
document.getElementById("collapseParticipante3").classList.add("show");
//alert("Nome não informado");
rg3.focus();
return true;
}else if(celular3.value == ""){
document.getElementById("collapseParticipante3").classList.add("show");
//alert("Nome não informado");
celular3.focus();
return true;
}else if(cep3.value == ""){
document.getElementById("collapseParticipante3").classList.add("show");
//alert("Nome não informado");
cep3.focus();
return true;
}else if(estado3.value == ""){
document.getElementById("collapseParticipante3").classList.add("show");
//alert("Nome não informado");
estado3.focus();
return true;
}else if(cidade3.value == ""){
document.getElementById("collapseParticipante3").classList.add("show");
//alert("Nome não informado");
cidade3.focus();
return true;
}else if(bairro3.value == ""){
document.getElementById("collapseParticipante3").classList.add("show");
//alert("Nome não informado");
bairro3.focus();
return true;
}else if(rua3.value == ""){
document.getElementById("collapseParticipante3").classList.add("show");
//alert("Nome não informado");
rua3.focus();
return true;
}else if(numero3.value == ""){
document.getElementById("collapseParticipante3").classList.add("show");
//alert("Nome não informado");
numero3.focus();
return true;
}else if(complemento3.value == ""){
document.getElementById("collapseParticipante3").classList.add("show");
//alert("Nome não informado");
complemento3.focus();
return true;
}else if(complemento3.value == ""){
document.getElementById("collapseParticipante3").classList.add("show");
//alert("Nome não informado");
complemento3.focus();
return true;
}else if(universidade3.value == ""){
document.getElementById("collapseParticipante3").classList.add("show");
//alert("Nome não informado");
universidade3.focus();
return true;
}else if(curso3.value == ""){
document.getElementById("collapseParticipante3").classList.add("show");
//alert("Nome não informado");
curso3.focus();
return true;
}else if(turno3.value == ""){
document.getElementById("collapseParticipante3").classList.add("show");
//alert("Nome não informado");
turno3.focus();
return true;
}else if(totalDePeriodos3.value == ""){
document.getElementById("collapseParticipante3").classList.add("show");
//alert("Nome não informado");
totalDePeriodos3.focus();
return true;
}else if(periodoAtual3.value == ""){
document.getElementById("collapseParticipante3").classList.add("show");
//alert("Nome não informado");
periodoAtual3.focus();
return true;
}else if(ordemDePrioridade3.value == ""){
document.getElementById("collapseParticipante3").classList.add("show");
//alert("Nome não informado");
ordemDePrioridade3.focus();
return true;
}else if(coeficineteDeRendimento3.value == ""){
document.getElementById("collapseParticipante3").classList.add("show");
//alert("Nome não informado");
coeficineteDeRendimento3.focus();
return true;
}else if(tituloPlanoDeTrabalho3.value == ""){
document.getElementById("collapseParticipante3").classList.add("show");
//alert("Nome não informado");
tituloPlanoDeTrabalho3.focus();
return true;
}else if(anexoPlanoDeTrabalho3.value == ""){
document.getElementById("collapseParticipante3").classList.add("show");
//alert("Nome não informado");
anexoPlanoDeTrabalho3.focus();
return true;
}
}
</script>
</script>
@endsection
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