Commit 92902ee3 authored by Yuri Resende's avatar Yuri Resende
Browse files
parents 8bde6feb d6e8f1f8
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
/vendor /vendor
.env .env
.env.backup .env.backup
.idea
.phpunit.result.cache .phpunit.result.cache
Homestead.json Homestead.json
Homestead.yaml Homestead.yaml
......
...@@ -130,7 +130,7 @@ class Evento extends Model ...@@ -130,7 +130,7 @@ class Evento extends Model
'tipoAvaliacao' => ['required'], 'tipoAvaliacao' => ['required'],
'inicioSubmissao' => ['required', 'date', 'after_or_equal:inicioSubmissao'], 'inicioSubmissao' => ['required', 'date', 'after_or_equal:inicioSubmissao'],
'fimSubmissao' => ['required', 'date', 'after_or_equal:inicioSubmissao'], 'fimSubmissao' => ['required', 'date', 'after_or_equal:inicioSubmissao'],
'pdfEdital' => [('pdfEditalPreenchido'!=='sim'?'required':''), 'file', 'mimes:pdf', 'max:2048'], 'pdfEdital' => ['sometimes', 'required', 'file', 'mimes:pdf', 'max:2048'],
]; ];
public function endereco(){ public function endereco(){
......
...@@ -402,6 +402,11 @@ class TrabalhoController extends Controller ...@@ -402,6 +402,11 @@ class TrabalhoController extends Controller
$trabalho->anexo_SIPAC = Storage::putFileAs($pasta, $request->anexo_SIPAC, "Anexo_SIPAC." . $request->file('anexo_SIPAC')->extension()); $trabalho->anexo_SIPAC = Storage::putFileAs($pasta, $request->anexo_SIPAC, "Anexo_SIPAC." . $request->file('anexo_SIPAC')->extension());
} }
//Anexo Acao Afirmativa
if (isset($request->anexo_acao_afirmativa)) {
$trabalho->anexo_acao_afirmativa = Storage::putFileAs($pasta, $request->anexo_acao_afirmativa, "Anexo_Acao_Afirmativa." . $request->file('anexo_acao_afirmativa')->extension());
}
return $trabalho; return $trabalho;
} }
...@@ -770,6 +775,17 @@ class TrabalhoController extends Controller ...@@ -770,6 +775,17 @@ class TrabalhoController extends Controller
return abort(404); return abort(404);
} }
public function baixarAcaoAfirmativa($id)
{
$projeto = Trabalho::find($id);
//dd($projeto);
if (Storage::disk()->exists($projeto->anexo_acao_afirmativa)) {
ob_end_clean();
return Storage::download($projeto->anexo_acao_afirmativa);
}
return abort(404);
}
public function baixarAnexoGrupoPesquisa($id) public function baixarAnexoGrupoPesquisa($id)
{ {
$projeto = Trabalho::find($id); $projeto = Trabalho::find($id);
...@@ -1207,7 +1223,7 @@ class TrabalhoController extends Controller ...@@ -1207,7 +1223,7 @@ class TrabalhoController extends Controller
public function salvar(StoreTrabalho $request) public function salvar(StoreTrabalho $request)
{ {
// dd($request->all()); //dd($request->all());
try { try {
if (!$request->has('rascunho')) { if (!$request->has('rascunho')) {
$request->merge([ $request->merge([
...@@ -1235,11 +1251,12 @@ class TrabalhoController extends Controller ...@@ -1235,11 +1251,12 @@ class TrabalhoController extends Controller
'justificativaAutorizacaoEtica','modalidade','anexo_docExtra', 'justificativaAutorizacaoEtica','modalidade','anexo_docExtra',
])); ]));
} else { } else {
//dd();
$trabalho = Auth::user()->proponentes->trabalhos() $trabalho = Auth::user()->proponentes->trabalhos()
->create($request->except([ ->create($request->except([
'anexoProjeto', 'anexoDecisaoCONSU', 'anexoPlanilhaPontuacao', 'anexoProjeto', 'anexoDecisaoCONSU', 'anexoPlanilhaPontuacao',
'anexoLattesCoordenador', 'anexoGrupoPesquisa', 'anexoAutorizacaoComiteEtica', 'anexoLattesCoordenador', 'anexoGrupoPesquisa', 'anexoAutorizacaoComiteEtica',
'justificativaAutorizacaoEtica','modalidade','anexo_docExtra', 'anexo_SIPAC' 'justificativaAutorizacaoEtica','modalidade','anexo_docExtra', 'anexo_SIPAC', 'anexo_acao_afirmativa'
])); ]));
} }
...@@ -1253,7 +1270,11 @@ class TrabalhoController extends Controller ...@@ -1253,7 +1270,11 @@ class TrabalhoController extends Controller
$data['cpf'] = $request->cpf[$part]; $data['cpf'] = $request->cpf[$part];
//Quando o integrante é um estudante //Quando o integrante é um estudante
if($request->estudante[$part] == true){ if($request->estudante[$part] == true){
$data_nascimento = Carbon::createFromFormat('d/m/Y', $request->data_de_nascimento[$part])->toDateString(); if($request->data_de_nascimento[$part] == null){
$data_nascimento = null;
}else {
$data_nascimento = Carbon::createFromFormat('d/m/Y', $request->data_de_nascimento[$part])->toDateString();
}
$data['data_de_nascimento'] = $data_nascimento; $data['data_de_nascimento'] = $data_nascimento;
$data['rg'] = $request->rg[$part]; $data['rg'] = $request->rg[$part];
$data['celular'] = $request->celular[$part]; $data['celular'] = $request->celular[$part];
...@@ -1274,16 +1295,20 @@ class TrabalhoController extends Controller ...@@ -1274,16 +1295,20 @@ class TrabalhoController extends Controller
$data['curso'] = $request->outrocurso[$part]; $data['curso'] = $request->outrocurso[$part];
} }
if($evento->tipo!="PIBEX") { if($evento->tipo != "CONTINUO"){
$data['media_do_curso'] = $request->media_do_curso[$part]; if($evento->tipo != "PIBEX") {
$data['media_do_curso'] = $request->media_do_curso[$part];
}
$data['nomePlanoTrabalho'] = $request->nomePlanoTrabalho[$part];
} }
$data['nomePlanoTrabalho'] = $request->nomePlanoTrabalho[$part];
} }
//função no projeto //função no projeto
if (FuncaoParticipantes::where('nome', $request->funcaoParticipante[$part])->exists()) if($evento->tipo != "CONTINUO"){
$data['funcao_participante_id'] = FuncaoParticipantes::where('nome', $request->funcaoParticipante[$part])->first()->id; if (FuncaoParticipantes::where('nome', $request->funcaoParticipante[$part])->exists())
$data['funcao_participante_id'] = FuncaoParticipantes::where('nome', $request->funcaoParticipante[$part])->first()->id;
}
//instituição do participante //instituição do participante
if ($request->instituicao[$part] != "Outra") { if ($request->instituicao[$part] != "Outra") {
...@@ -1311,20 +1336,22 @@ class TrabalhoController extends Controller ...@@ -1311,20 +1336,22 @@ class TrabalhoController extends Controller
$participante->trabalho_id = $trabalho->id; $participante->trabalho_id = $trabalho->id;
$participante->save(); $participante->save();
if ($request->estudante[$part] == true && $request['nomePlanoTrabalho'][$part] != null) { if($evento->tipo != "CONTINUO"){
$path = 'trabalhos/' . $evento->id . '/' . $trabalho->id . '/'; if ($request->estudante[$part] == true && $request['nomePlanoTrabalho'][$part] != null) {
$nome = $request['nomePlanoTrabalho'][$part] . ".pdf"; $path = 'trabalhos/' . $evento->id . '/' . $trabalho->id . '/';
$file = $request->anexoPlanoTrabalho[$part]; $nome = $request['nomePlanoTrabalho'][$part] . ".pdf";
Storage::putFileAs($path, $file, $nome); $file = $request->anexoPlanoTrabalho[$part];
$arquivo = new Arquivo(); Storage::putFileAs($path, $file, $nome);
$arquivo->titulo = $request['nomePlanoTrabalho'][$part]; $arquivo = new Arquivo();
$arquivo->nome = $path . $nome; $arquivo->titulo = $request['nomePlanoTrabalho'][$part];
$arquivo->trabalhoId = $trabalho->id; $arquivo->nome = $path . $nome;
$arquivo->data = now(); $arquivo->trabalhoId = $trabalho->id;
$arquivo->participanteId = $participante->id; $arquivo->data = now();
$arquivo->versaoFinal = true; $arquivo->participanteId = $participante->id;
$arquivo->save(); $arquivo->versaoFinal = true;
$arquivo->save();
}
} }
} }
......
...@@ -75,7 +75,6 @@ class UserController extends Controller ...@@ -75,7 +75,6 @@ class UserController extends Controller
$id = Auth()->user()->id; $id = Auth()->user()->id;
$user = User::find($id); $user = User::find($id);
if ($request->tipo != "proponente") { if ($request->tipo != "proponente") {
$validated = $request->validate([ $validated = $request->validate([
'name' => ['required', 'string', 'max:255'], 'name' => ['required', 'string', 'max:255'],
'instituicao' => ['required_if:instituicaoSelect,Outra', 'max:255'], 'instituicao' => ['required_if:instituicaoSelect,Outra', 'max:255'],
...@@ -83,21 +82,6 @@ class UserController extends Controller ...@@ -83,21 +82,6 @@ class UserController extends Controller
'celular' => ['required', 'string'], 'celular' => ['required', 'string'],
'cpf' => ['required', 'cpf'], 'cpf' => ['required', 'cpf'],
]); ]);
} else if ($user->tipo == 'participante') {
$validated = $request->validate([
'name' => ['required', 'string', 'max:255'],
'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],
'password' => ['required', 'string', 'min:8', 'confirmed'],
'cpf' => ['required', 'cpf', 'unique:users'],
'rg' => ['required', 'unique:participantes'],
'celular' => ['required', 'string', 'telefone'],
'instituicao' => ['required_if:instituicaoSelect,Outra', 'max:255'],
'instituicaoSelect' => ['required_without:instituicao'],
'outroCursoEstudante' => ['required_if:cursoEstudante,Outro', 'max:255'],
'cursoEstudante' => ['required_without:outroCursoEstudante'],
'perfil' => ['required'],
'linkLattes' => ['required'],
]);
} else { } else {
$validated = $request->validate([ $validated = $request->validate([
'name' => ['required', 'string', 'max:255'], 'name' => ['required', 'string', 'max:255'],
...@@ -126,6 +110,24 @@ class UserController extends Controller ...@@ -126,6 +110,24 @@ class UserController extends Controller
]); ]);
} }
if ($user->tipo == 'participante') {
$validated = $request->validate([
'name' => ['required', 'string', 'max:255'],
'email' => ['required_if:alterarSenhaCheckBox,on', 'string', 'email', 'max:255', Rule::unique('users')->ignore($user->id)],
'password' => ['required_if:alterarSenhaCheckBox,on', 'string', 'min:8', 'confirmed'],
'cpf' => ['required', 'cpf', Rule::unique('users')->ignore($user->id)],
'rg' => ['required', Rule::unique('participantes')->ignore($user->participantes->first()->id)],
'celular' => ['required', 'string', 'telefone'],
'instituicao' => ['required_if:instituicaoSelect,Outra', 'max:255'],
'instituicaoSelect' => ['required_without:instituicao'],
'outroCursoEstudante' => ['required_if:cursoEstudante,Outro', 'max:255'],
'cursoEstudante' => ['required_without:outroCursoEstudante'],
'perfil' => ['required'],
'linkLattes' => ['required', 'url'],
]);
}
if ($request->alterarSenhaCheckBox != null) { if ($request->alterarSenhaCheckBox != null) {
if (!(Hash::check($request->senha_atual, $user->password))) { if (!(Hash::check($request->senha_atual, $user->password))) {
return redirect()->back()->withErrors(['senha_atual' => 'Senha atual não correspondente']); return redirect()->back()->withErrors(['senha_atual' => 'Senha atual não correspondente']);
...@@ -135,13 +137,13 @@ class UserController extends Controller ...@@ -135,13 +137,13 @@ class UserController extends Controller
return redirect()->back()->withErrors(['nova_senha' => 'Senhas diferentes']); return redirect()->back()->withErrors(['nova_senha' => 'Senhas diferentes']);
} }
} }
if($user->avaliadors != null && $request->area != null && $user->tipo == "avaliador"){ if($user->avaliadors != null && $request->area != null && $user->tipo == "avaliador"){
$avaliador = Avaliador::where('user_id', '=', $id)->first(); $avaliador = Avaliador::where('user_id', '=', $id)->first();
$avaliador->user_id = $user->id; $avaliador->user_id = $user->id;
//$avaliador->area_id = $request->area; //$avaliador->area_id = $request->area;
$avaliador->naturezas()->sync($request->natureza); $avaliador->naturezas()->sync($request->natureza);
$avaliador->update(); $avaliador->update();
} }
...@@ -259,7 +261,7 @@ class UserController extends Controller ...@@ -259,7 +261,7 @@ class UserController extends Controller
if($user->endereco()->first() == null){ if($user->endereco()->first() == null){
$endereco = Endereco::create(); $endereco = Endereco::create();
$endereco->user()->save($user); $endereco->user()->save($user);
} }
if ($user->participantes()->exists() && $user->participantes()->first()->curso_id) if ($user->participantes()->exists() && $user->participantes()->first()->curso_id)
...@@ -290,5 +292,5 @@ class UserController extends Controller ...@@ -290,5 +292,5 @@ class UserController extends Controller
'cursoPart' => $cursoPart, 'cursoPart' => $cursoPart,
'areaTematica' => $areaTematica 'areaTematica' => $areaTematica
]); ]);
} }
} }
...@@ -105,6 +105,7 @@ class StoreTrabalho extends FormRequest ...@@ -105,6 +105,7 @@ class StoreTrabalho extends FormRequest
if($evento->tipo!="PIBEX" && $evento->tipo!="CONTINUO"){ if($evento->tipo!="PIBEX" && $evento->tipo!="CONTINUO"){
//dd($this->preenchimentoFormFlag);
$rules['anexoPlanilhaPontuacao'] = ['required']; $rules['anexoPlanilhaPontuacao'] = ['required'];
$rules['anexoLattesCoordenador'] = ['required', 'mimes:pdf']; $rules['anexoLattesCoordenador'] = ['required', 'mimes:pdf'];
$rules['anexoGrupoPesquisa'] = ['required', 'mimes:pdf']; $rules['anexoGrupoPesquisa'] = ['required', 'mimes:pdf'];
...@@ -112,6 +113,8 @@ class StoreTrabalho extends FormRequest ...@@ -112,6 +113,8 @@ class StoreTrabalho extends FormRequest
$rules['justificativaAutorizacaoEtica']= [Rule::requiredIf($this->autorizacaoFlag == 'nao')]; $rules['justificativaAutorizacaoEtica']= [Rule::requiredIf($this->autorizacaoFlag == 'nao')];
$rules['pontuacaoPlanilha'] = ['required', 'string']; $rules['pontuacaoPlanilha'] = ['required', 'string'];
$rules['linkGrupoPesquisa'] = ['required', 'string']; $rules['linkGrupoPesquisa'] = ['required', 'string'];
$rules['preenchimentoFormFlag'] = [Rule::in(['sim']), 'required'];
$rules['anexo_acao_afirmativa'] = [Rule::requiredIf($this->radioAcoesAfirmativas == 'sim')];
} }
$rules['editalId'] = ['required', 'string']; $rules['editalId'] = ['required', 'string'];
......
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddAnexoAcaoAfirmativaToTrabalhosTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('trabalhos', function (Blueprint $table) {
$table->string('anexo_acao_afirmativa')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('trabalhos', function (Blueprint $table) {
$table->dropColumn('anexo_acao_afirmativa');
});
}
}
...@@ -76,7 +76,6 @@ class UsuarioSeeder extends Seeder ...@@ -76,7 +76,6 @@ class UsuarioSeeder extends Seeder
]); ]);
DB::table('users')->insert([ DB::table('users')->insert([
'name'=>'Participante1', 'name'=>'Participante1',
'email'=>'part1@ufrpe.br', 'email'=>'part1@ufrpe.br',
'password'=>Hash::make('12345678'), 'password'=>Hash::make('12345678'),
......
...@@ -510,6 +510,12 @@ ...@@ -510,6 +510,12 @@
<a href="{{ route('baixar.anexo.consu', ['id' => $trabalho->id]) }}"><img class="" src="{{asset('img/icons/pdf.ico')}}" style="width:40px" alt=""></a> <a href="{{ route('baixar.anexo.consu', ['id' => $trabalho->id]) }}"><img class="" src="{{asset('img/icons/pdf.ico')}}" style="width:40px" alt=""></a>
</div> </div>
@endif @endif
@if($evento->tipo == 'PIBIC' && $evento->natureza_id == 2)
<div class="col-sm-4">
<label title="Decisão da Câmara ou Conselho Pertinente" for="anexo_acao_afirmativa" class="col-form-label font-tam" style="font-weight: bold">{{ __('Ação Afirmativa: ') }}</label>
<a href="{{ route('baixar.anexo.acao.afirmativa', ['id' => $trabalho->id]) }}"><img class="" src="{{asset('img/icons/pdf.ico')}}" style="width:40px" alt=""></a>
</div>
@endif
@if($evento->nome_docExtra != null) @if($evento->nome_docExtra != null)
{{-- Documento Extra --}} {{-- Documento Extra --}}
<div class="col-sm-4"> <div class="col-sm-4">
...@@ -706,25 +712,27 @@ ...@@ -706,25 +712,27 @@
</select> </select>
@else @else
@foreach($trabalho->participantes as $participante) @foreach($trabalho->participantes as $participante)
<div class="col-md-6"> @if($participante->planoTrabalho != null)
<label style="font-weight: bold;font-size: 18px">Plano: {{$participante->planoTrabalho->titulo}}</label> <div class="col-md-6">
</div> <label style="font-weight: bold;font-size: 18px">Plano: {{$participante->planoTrabalho->titulo}}</label>
@php </div>
$avaliacoesId = \App\AvaliacaoRelatorio::where("arquivo_id",$participante->planoTrabalho->id)->where("tipo",$tipoTemp)->pluck('user_id'); @php
$avalProjeto = \Illuminate\Support\Facades\DB::table('users')->join('avaliadors','users.id','=','avaliadors.user_id')->whereNotIn('users.id', $avaliacoesId)->orderBy('users.name')->get(); $avaliacoesId = \App\AvaliacaoRelatorio::where("arquivo_id",$participante->planoTrabalho->id)->where("tipo",$tipoTemp)->pluck('user_id');
@endphp $avalProjeto = \Illuminate\Support\Facades\DB::table('users')->join('avaliadors','users.id','=','avaliadors.user_id')->whereNotIn('users.id', $avaliacoesId)->orderBy('users.name')->get();
@endphp
<select name="avaliadores_{{$participante->planoTrabalho->id}}_id[]" multiple
class="form-control" id="avaliacaoSelect" <select name="avaliadores_{{$participante->planoTrabalho->id}}_id[]" multiple
style="height: 200px;font-size:15px"> class="form-control" id="avaliacaoSelect"
@foreach ($avalProjeto as $avaliador) style="height: 200px;font-size:15px">
<option value="{{ $avaliador->user_id }}"> {{ $avaliador->name }} @foreach ($avalProjeto as $avaliador)
> {{$avaliador->instituicao ?? 'Instituição Indefinida'}} <option value="{{ $avaliador->user_id }}"> {{ $avaliador->name }}
> {{$avaliador->tipo}} > {{$avaliador->instituicao ?? 'Instituição Indefinida'}}
> {{$avaliador->email}}</option> > {{$avaliador->tipo}}
> {{$avaliador->email}}</option>
@endforeach @endforeach
</select> </select>
@endif
@endforeach @endforeach
@endif @endif
<small id="emailHelp" class="form-text text-muted">Segure SHIFT do <small id="emailHelp" class="form-text text-muted">Segure SHIFT do
......
...@@ -52,13 +52,13 @@ ...@@ -52,13 +52,13 @@
<div class="row"> <div class="row">
<div class="col-6"> <div class="col-6">
@component('componentes.input', ['label' => 'CEP']) @component('componentes.input', ['label' => 'CEP'])
<input type="text" class="form-control cep" value="{{$participante->user->endereco->cep}}" name="cep" placeholder="CEP" disabled /> <input type="text" class="form-control cep" value="@if(isset($participante->user->endereco)){{$participante->user->endereco->cep}} @endif" name="cep" placeholder="CEP" disabled />
@endcomponent @endcomponent
</div> </div>
<div class="col-6"> <div class="col-6">
@component('componentes.select', ['label' => 'Estado']) @component('componentes.select', ['label' => 'Estado'])
<select name="uf" id="estado" class="form-control" style="visibility: visible" disabled> <select name="uf" id="estado" class="form-control" style="visibility: visible" disabled>
<option value="{{$participante->user->endereco->uf}}" selected>{{$participante->user->endereco->uf}}</option> <option value="@if(isset($participante->user->endereco)) {{$participante->user->endereco->uf}} @endif" selected>@if(isset($participante->user->endereco)) {{$participante->user->endereco->uf}} @endif</option>
</select> </select>
@endcomponent @endcomponent
</div> </div>
...@@ -66,24 +66,24 @@ ...@@ -66,24 +66,24 @@
<div class="row"> <div class="row">
<div class="col-6"> <div class="col-6">
@component('componentes.input', ['label' => 'Cidade']) @component('componentes.input', ['label' => 'Cidade'])
<input type="text" class="form-control" value="{{$participante->user->endereco->cidade}}" name="cidade" placeholder="Cidade" maxlength="50" id="cidade{{$participante->id}}" disabled /> <input type="text" class="form-control" value=" @if(isset($participante->user->endereco)){{$participante->user->endereco->cidade}} @endif" name="cidade" placeholder="Cidade" maxlength="50" id="cidade{{$participante->id}}" disabled />
@endcomponent @endcomponent
</div> </div>
<div class="col-6"> <div class="col-6">
@component('componentes.input', ['label' => 'Bairro']) @component('componentes.input', ['label' => 'Bairro'])
<input type="text" class="form-control" value="{{$participante->user->endereco->bairro}}" name="bairro" placeholder="Bairro" maxlength="50" id="bairro{{$participante->id}}" disabled /> <input type="text" class="form-control" value="@if(isset($participante->user->endereco)){{$participante->user->endereco->bairro}} @endif" name="bairro" placeholder="Bairro" maxlength="50" id="bairro{{$participante->id}}" disabled />
@endcomponent @endcomponent
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-6"> <div class="col-6">
@component('componentes.input', ['label' => 'Rua']) @component('componentes.input', ['label' => 'Rua'])
<input type="text" class="form-control" value="{{$participante->user->endereco->rua}}" name="rua" placeholder="Rua" maxlength="100" id="rua{{$participante->id}}" disabled /> <input type="text" class="form-control" value="@if(isset($participante->user->endereco)) {{ $participante->user->endereco->rua}} @endif" name="rua" placeholder="Rua" maxlength="100" id="rua{{$participante->id}}" disabled />
@endcomponent @endcomponent
</div> </div>
<div class="col-6"> <div class="col-6">
@component('componentes.input', ['label' => 'Número']) @component('componentes.input', ['label' => 'Número'])
<input type="text" class="form-control" value="{{$participante->user->endereco->numero}}" name="numero" placeholder="Número" disabled /> <input type="text" class="form-control" value="@if(isset($participante->user->endereco)){{$participante->user->endereco->numero}} @endif" name="numero" placeholder="Número" disabled />
@endcomponent @endcomponent
</div> </div>
</div> </div>
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
<div class="col-12"> <div class="col-12">
<div class="form-group"> <div class="form-group">
<label class=" control-label" for="firstname">Complemento</label> <label class=" control-label" for="firstname">Complemento</label>
<input type="text" class="form-control" value="{{$participante->user->endereco->complemento}}" name="complemento" placeholder="Complemento" maxlength="75" id="complemento{{$participante->id}}" disabled /> <input type="text" class="form-control" value="@if(isset($participante->user->endereco)){{ $participante->user->endereco->complemento}} @endif" name="complemento" placeholder="Complemento" maxlength="75" id="complemento{{$participante->id}}" disabled />
</div> </div>
</div> </div>
</div> </div>
......
...@@ -2,693 +2,882 @@ ...@@ -2,693 +2,882 @@
@section('content') @section('content')
<div class="container" style="margin-top: 3rem"> <div class="container" style="margin-top: 3rem">
<form method="POST" action="{{ route('register') }}"> <form method="POST" action="{{ route('register') }}">
@csrf @csrf
<div class="row justify-content-center"> <div class="row justify-content-center">
<div class="col-md-8" style="margin-bottom:20px"> <div class="col-md-8" style="margin-bottom:20px">
<div class="card shadow bg-white" style="border-radius:12px; border-width:0px;"> <div class="card shadow bg-white" style="border-radius:12px; border-width:0px;">
<div class="card-header" style="border-top-left-radius: 12px; border-top-right-radius: 12px; background-color: #fff"> <div class="card-header"
<div class="d-flex justify-content-between align-items-center" style="margin-top: 9px; margin-bottom:6px"> style="border-top-left-radius: 12px; border-top-right-radius: 12px; background-color: #fff">
<h5 class="card-title mb-0" style="font-size:25px; font-family:Arial, Helvetica, sans-serif; color:#1492E6">Cadastro</h5> <div class="d-flex justify-content-between align-items-center"
<h6 class="card-title mb-0" style="color:red">* Campos obrigatórios</h6> style="margin-top: 9px; margin-bottom:6px">
<h5 class="card-title mb-0"
style="font-size:25px; font-family:Arial, Helvetica, sans-serif; color:#1492E6">
Cadastro</h5>
<h6 class="card-title mb-0" style="color:red">* Campos obrigatórios</h6>
</div>
</div> </div>
</div> <div class="card-body">
<div class="card-body"> <div class="form-row">
<div class="form-row"> <div class="col-md-12">
<div class="col-md-12"> <div class="d-flex justify-content-between align-items-center"
<div class="d-flex justify-content-between align-items-center" style="margin-bottom:6px"> style="margin-bottom:6px">
<h5 class="card-title mb-0" style="font-size:20px; font-family:Arial, Helvetica, sans-serif; font-family:Arial, Helvetica, sans-serif; ">Informações pessoais</h5> <h5 class="card-title mb-0"
style="font-size:20px; font-family:Arial, Helvetica, sans-serif; font-family:Arial, Helvetica, sans-serif; ">
Informações pessoais</h5>
</div>
</div> </div>
</div> <div class="col-md-12">
<div class="col-md-12"> <div class="form-group">
<div class="form-group"> <label for="name" class="col-form-label"
<label for="name" class="col-form-label" style="font-weight:600;">{{ __('Nome Completo') }}<span style="color: red; font-weight:bold;">*</span></label> style="font-weight:600;">{{ __('Nome Completo') }}<span
<input id="name" type="text" class="form-control @error('name') is-invalid @enderror" name="name" placeholder="Digite seu nome completo" value="{{ old('name') }}" required autocomplete="name" autofocus> style="color: red; font-weight:bold;">*</span></label>
@error('name') <input id="name" type="text"
<span class="invalid-feedback" role="alert"> class="form-control @error('name') is-invalid @enderror" name="name"
placeholder="Digite seu nome completo" value="{{ old('name') }}" required
autocomplete="name" autofocus>
@error('name')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div>
</div> </div>
</div> <div class="col-md-6">
<div class="col-md-6"> <div class="form-group">
<div class="form-group"> <label for="cpf" class="col-form-label" style="font-weight:600;">{{ __('CPF') }}
<label for="cpf" class="col-form-label" style="font-weight:600;">{{ __('CPF') }}<span style="color: red; font-weight:bold;">*</span></label> <span style="color: red; font-weight:bold;">*</span></label>
<input id="cpf" type="text" class="form-control @error('cpf') is-invalid @enderror" name="cpf" placeholder="Digite o número do CPF" value="{{ old('cpf') }}" required autocomplete="cpf" autofocus> <input id="cpf" type="text"
class="form-control @error('cpf') is-invalid @enderror" name="cpf"
@error('cpf') placeholder="Digite o número do CPF" value="{{ old('cpf') }}" required
<span class="invalid-feedback" role="alert"> autocomplete="cpf" autofocus>
@error('cpf')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div>
</div> </div>
</div> <div class="col-md-6">
<div class="col-md-6"> <div class="form-group">
<div class="form-group"> <label for="rg" class="col-form-label" style="font-weight:600;">{{ __('RG') }}
<label for="rg" class="col-form-label" style="font-weight:600;">{{ __('RG') }}<span style="color: red; font-weight:bold;">*</span></label> <span style="color: red; font-weight:bold;">*</span></label>
<input id="rg" type="text" class="form-control @error('rg') is-invalid @enderror" name="rg" placeholder="Digite o número do RG" value="{{ old('rg') }}" required autocomplete="rg" autofocus> <input id="rg" type="text"
class="form-control @error('rg') is-invalid @enderror" name="rg"
@error('rg') placeholder="Digite o número do RG" value="{{ old('rg') }}" required
<span class="invalid-feedback" role="alert"> autocomplete="rg" autofocus>
@error('rg')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div>
</div> </div>
</div> <div class="col-md-6">
<div class="col-md-6"> <div class="form-group">
<div class="form-group"> <label for="celular" class="col-form-label"
<label for="celular" class="col-form-label" style="font-weight:600;">{{ __('Celular') }}<span style="color: red; font-weight:bold;">*</span></label> style="font-weight:600;">{{ __('Celular') }}<span
<input id="celular" type="text" class="form-control @error('celular') is-invalid @enderror" name="celular" placeholder="Digite o número do seu celular" value="{{ old('celular') }}" required autocomplete="celular" autofocus> style="color: red; font-weight:bold;">*</span></label>
<input id="celular" type="text"
@error('celular') class="form-control @error('celular') is-invalid @enderror"
<span class="invalid-feedback" role="alert"> name="celular" placeholder="Digite o número do seu celular"
value="{{ old('celular') }}" required autocomplete="celular" autofocus>
@error('celular')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div>
</div> </div>
</div> <div class="col-md-12">
<div class="col-md-12"> <div class="d-flex justify-content-between align-items-center"
<div class="d-flex justify-content-between align-items-center" style="margin-bottom:6px"> style="margin-bottom:6px">
<h5 class="card-title mb-0" style="font-size:20px; font-family:Arial, Helvetica, sans-serif; font-family:Arial, Helvetica, sans-serif; ">Instituição</h5> <h5 class="card-title mb-0"
style="font-size:20px; font-family:Arial, Helvetica, sans-serif; font-family:Arial, Helvetica, sans-serif; ">
Instituição</h5>
</div>
</div> </div>
</div> <div class="col-md-12">
<div class="col-md-12"> <div class="form-group">
<div class="form-group"> <label for="instituicaoSelect" class="col-form-label"
<label for="instituicaoSelect" class="col-form-label" style="font-weight:600;">{{ __('Instituição de Vínculo') }}<span style="color: red; font-weight:bold;">*</span></label> style="font-weight:600;">{{ __('Instituição de Vínculo') }}<span
<select style="display: inline" onchange="showInstituicao()" class="form-control @error('instituicaoSelect') is-invalid @enderror" name="instituicaoSelect" id="instituicaoSelect"> style="color: red; font-weight:bold;">*</span></label>
<option value="" disabled selected hidden>-- Instituição --</option> <select style="display: inline" onchange="showInstituicao()"
<option @if(old('instituicaoSelect')=='UFAPE' ) selected @endif value="UFAPE">Universidade Federal do Agreste de Pernambuco - UFAPE</option> class="form-control @error('instituicaoSelect') is-invalid @enderror"
<option @if(old('instituicaoSelect')=='Outra' ) selected @endif value="Outra">Outra</option> name="instituicaoSelect" id="instituicaoSelect">
</select> <option value="" disabled selected hidden>-- Instituição --</option>
@error('instituicaoSelect') <option @if(old('instituicaoSelect')=='UFAPE' ) selected
<span class="invalid-feedback" role="alert"> @endif value="UFAPE">Universidade Federal do Agreste de Pernambuco -
UFAPE
</option>
<option @if(old('instituicaoSelect')=='Outra' ) selected
@endif value="Outra">Outra
</option>
</select>
@error('instituicaoSelect')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div>
</div> </div>
</div> <div class="col-md-12" id="displayOutro" style='display:none'>
<div class="col-md-12" id="displayOutro" style='display:none'> <div class="form-group">
<div class="form-group"> <label for="instituicao" class="col-form-label"
<label for="instituicao" class="col-form-label" style="font-weight:600;">{{ __('Digite a Instituição') }}<span style="color: red; font-weight:bold;">*</span></label> style="font-weight:600;">{{ __('Digite a Instituição') }}<span
<input id="instituicao" type="text" class="form-control @error('instituicao') is-invalid @enderror" name="instituicao" value="{{ old('instituicao') }}" placeholder="Digite o nome da Instituição" autofocus> style="color: red; font-weight:bold;">*</span></label>
@error('instituicao') <input id="instituicao" type="text"
<span class="invalid-feedback" role="alert"> class="form-control @error('instituicao') is-invalid @enderror"
name="instituicao" value="{{ old('instituicao') }}"
placeholder="Digite o nome da Instituição" autofocus>
@error('instituicao')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div>
</div> </div>
</div> <div class="col-md-6">
<div class="col-md-6"> <div class="form-group">
<div class="form-group"> <label for="perfil" class="col-form-label"
<label for="perfil" class="col-form-label" style="font-weight:600;">{{ __('Perfil') }}<span style="color: red; font-weight:bold;">*</span></label> style="font-weight:600;">{{ __('Perfil') }}<span
<select id="perfil" name="perfil" class="form-control @error('perfil') is-invalid @enderror" onchange="mudarPerfil()"> style="color: red; font-weight:bold;">*</span></label>
<option value="" disabled selected hidden>-- Perfil --</option> <select id="perfil" name="perfil"
<option @if(old('perfil')=='Professor' ) selected @endif value="Professor">Professor</option> class="form-control @error('perfil') is-invalid @enderror"
<option @if(old('perfil')=='Técnico' ) selected @endif value="Técnico">Técnico</option> onchange="mudarPerfil()">
<option @if(old('perfil')=='Estudante' ) selected @endif value="Estudante">Estudante</option> <option value="" disabled selected hidden>-- Perfil --</option>
<option @if(old('perfil')=='Outro' ) selected @endif value="Outro">Outro</option> <option @if(old('perfil')=='Professor' ) selected @endif value="Professor">
</select> Professor
@error('perfil') </option>
<span class="invalid-feedback" role="alert"> <option @if(old('perfil')=='Técnico' ) selected @endif value="Técnico">
Técnico
</option>
<option @if(old('perfil')=='Estudante' ) selected @endif value="Estudante">
Estudante
</option>
<option @if(old('perfil')=='Outro' ) selected @endif value="Outro">Outro
</option>
</select>
@error('perfil')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div>
</div> </div>
</div> <div class="col-md-6">
<div class="col-md-6"> <div class="form-group" id="outroPerfil">
<div class="form-group" id="outroPerfil"> <label for="outroPerfil" class="col-form-label"
<label for="outroPerfil" class="col-form-label" style="font-weight:600;">{{ __('Qual perfil?') }}<span style="color: red; font-weight:bold;">*</span></label> style="font-weight:600;">{{ __('Qual perfil?') }}<span
<input id="outroPerfil" type="text" class="form-control @error('outroPerfil') is-invalid @enderror" name="outroPerfil" placeholder="Digite aqui qual o seu perfil" value="{{ old('outroPerfil') }}"> style="color: red; font-weight:bold;">*</span></label>
@error('outroPerfil') <input id="outroPerfil" type="text"
<span class="invalid-feedback" role="alert"> class="form-control @error('outroPerfil') is-invalid @enderror"
name="outroPerfil" placeholder="Digite aqui qual o seu perfil"
value="{{ old('outroPerfil') }}">
@error('outroPerfil')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div>
</div> </div>
</div> <div style="display:none" id="divCursos" class="col-md-12 mb-2">
<div style="display:none" id="divCursos" class="col-md-12 mb-2"> <label for="curso" class="col-form-label"
<label for="curso" class="col-form-label" style="font-weight:600;">{{ __('Cursos que Leciona') }}<span style="color: red; font-weight:bold;">*</span></label> style="font-weight:600;">{{ __('Cursos que Leciona') }}<span
<br> style="color: red; font-weight:bold;">*</span></label>
<div class="row col-md-12"> <br>
@foreach($cursos as $curso) <div class="row col-md-12">
<div class="col-sm-6"> @foreach($cursos as $curso)
<input type="checkbox" name="curso[]" id="curso{{$curso->id}}" value="{{$curso->id}}"> @if($curso->nome == "Outro Curso")
<label class="form-check-label" for="curso{{$curso->id}}"> <div id="divOutroCurso" class="col-sm-6" style="display: none">
{{ $curso->nome }} <input type="checkbox" name="curso[]"
</label> id="curso{{$curso->id}}"
</div> value="{{$curso->id}}">
@endforeach <label class="form-check-label" for="curso{{$curso->id}}">
{{ $curso->nome }}
</label>
</div>
@else
<div class="col-sm-6">
<input type="checkbox" name="curso[]"
id="curso{{$curso->id}}"
value="{{$curso->id}}">
<label class="form-check-label" for="curso{{$curso->id}}">
{{ $curso->nome }}
</label>
</div>
@endif
@endforeach
</div>
</div> </div>
</div>
<!-- Proponente --> <!-- Proponente -->
<div class="col-md-6"> <div class="col-md-6">
<div class="form-group" id="divVinculo"> <div class="form-group" id="divVinculo">
<label for="vinculo" class="col-form-label" style="font-weight:600;">{{ __('Vínculo') }}<span style="color: red; font-weight:bold;">*</span></label> <label for="vinculo" class="col-form-label"
<select name="vinculo" id="vinculo" class="form-control @error('vinculo') is-invalid @enderror" onchange="mudarPerfil()"> style="font-weight:600;">{{ __('Vínculo') }}<span
<option value="" disabled selected hidden>-- Vínculo --</option> style="color: red; font-weight:bold;">*</span></label>
<option @if(old('vinculo')=='Servidor na ativa' ) selected @endif value="Servidor na ativa">Servidor na ativa</option> <select name="vinculo" id="vinculo"
<option @if(old('vinculo')=='Servidor aposentado' ) selected @endif value="Servidor aposentado">Servidor aposentado</option> class="form-control @error('vinculo') is-invalid @enderror"
<option @if(old('vinculo')=='Professor visitante' ) selected @endif value="Professor visitante">Professor visitante</option> onchange="mudarPerfil()">
<option @if(old('vinculo')=='Pós-doutorando' ) selected @endif value="Pós-doutorando">Pós-doutorando</option> <option value="" disabled selected hidden>-- Vínculo --</option>
<option @if(old('vinculo')=='Outro' ) selected @endif value="Outro">Outro</option> <option @if(old('vinculo')=='Servidor na ativa' ) selected
</select> @endif value="Servidor na ativa">Servidor na ativa
</option>
@error('vinculo') <option @if(old('vinculo')=='Servidor aposentado' ) selected
<span class="invalid-feedback" role="alert"> @endif value="Servidor aposentado">Servidor aposentado
</option>
<option @if(old('vinculo')=='Professor visitante' ) selected
@endif value="Professor visitante">Professor visitante
</option>
<option @if(old('vinculo')=='Pós-doutorando' ) selected
@endif value="Pós-doutorando">Pós-doutorando
</option>
<option @if(old('vinculo')=='Outro' ) selected @endif value="Outro">Outro
</option>
</select>
@error('vinculo')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div>
</div> </div>
</div> <div class="col-md-6">
<div class="col-md-6"> <div class="form-group" id="divOutro">
<div class="form-group" id="divOutro"> <label for="outro" class="col-form-label"
<label for="outro" class="col-form-label" style="font-weight:600;">{{ __('Qual?') }}<span style="color: red; font-weight:bold;">*</span></label> style="font-weight:600;">{{ __('Qual?') }}<span
<input id="outro" type="text" class="form-control @error('outro') is-invalid @enderror" name="outro" placeholder="Digite aqui o seu vínculo" value="{{ old('outro') }}"> style="color: red; font-weight:bold;">*</span></label>
@error('outro') <input id="outro" type="text"
<span class="invalid-feedback" role="alert"> class="form-control @error('outro') is-invalid @enderror" name="outro"
placeholder="Digite aqui o seu vínculo" value="{{ old('outro') }}">
@error('outro')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div> </div>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<div class="form-group" id="divTitulacaoMax" style="display: none"> <div class="form-group" id="divTitulacaoMax" style="display: none">
<label for="titulacaoMaxima" class="col-form-label" style="font-weight:600;">{{ __('Titulação Máxima') }}<span style="color: red; font-weight:bold;">*</span></label> <label for="titulacaoMaxima" class="col-form-label"
<select id="titulacaoMaxima" class="form-control @error('titulacaoMaxima') is-invalid @enderror" name="titulacaoMaxima" value="{{ old('titulacaoMaxima') }}" autocomplete="nome"> style="font-weight:600;">{{ __('Titulação Máxima') }}<span
<option value="" disabled selected hidden>-- Titulação --</option> style="color: red; font-weight:bold;">*</span></label>
<option @if(old('titulacaoMaxima')=='Doutorado' ) selected @endif value="Doutorado">Doutorado</option> <select id="titulacaoMaxima"
<option @if(old('titulacaoMaxima')=='Mestrado' ) selected @endif value="Mestrado">Mestrado</option> class="form-control @error('titulacaoMaxima') is-invalid @enderror"
<option @if(old('titulacaoMaxima')=='Especialização' ) selected @endif value="Especialização">Especialização</option> name="titulacaoMaxima" value="{{ old('titulacaoMaxima') }}"
<option @if(old('titulacaoMaxima')=='Graduação' ) selected @endif value="Graduação">Graduação</option> autocomplete="nome">
<option @if(old('titulacaoMaxima')=='Técnico' ) selected @endif value="Técnico">Técnico</option> <option value="" disabled selected hidden>-- Titulação --</option>
</select> <option @if(old('titulacaoMaxima')=='Doutorado' ) selected
@endif value="Doutorado">Doutorado
@error('titulacaoMaxima') </option>
<span class="invalid-feedback" role="alert"> <option @if(old('titulacaoMaxima')=='Mestrado' ) selected
@endif value="Mestrado">Mestrado
</option>
<option @if(old('titulacaoMaxima')=='Especialização' ) selected
@endif value="Especialização">Especialização
</option>
<option @if(old('titulacaoMaxima')=='Graduação' ) selected
@endif value="Graduação">Graduação
</option>
<option @if(old('titulacaoMaxima')=='Técnico' ) selected
@endif value="Técnico">Técnico
</option>
</select>
@error('titulacaoMaxima')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div>
</div> </div>
</div> <div class="col-md-6">
<div class="col-md-6"> <div class="form-group" id="anoTitulacao" style="display: none">
<div class="form-group" id="anoTitulacao" style="display: none"> <label for="AnoTitulacao" class="col-form-label"
<label for="AnoTitulacao" class="col-form-label" style="font-weight:600;">{{ __('Ano da Titulação Máxima') }}<span style="color: red; font-weight:bold;">*</span></label> style="font-weight:600;">{{ __('Ano da Titulação Máxima') }}<span
<input id="AnoTitulacao" type="text" class="form-control @error('anoTitulacao') is-invalid @enderror" name="anoTitulacao" placeholder="Digite o ano de titulação" value="{{ old('anoTitulacao') }}" autocomplete="nome"> style="color: red; font-weight:bold;">*</span></label>
<input id="AnoTitulacao" type="text"
@error('anoTitulacao') class="form-control @error('anoTitulacao') is-invalid @enderror"
<span class="invalid-feedback" role="alert"> name="anoTitulacao" placeholder="Digite o ano de titulação"
value="{{ old('anoTitulacao') }}" autocomplete="nome">
@error('anoTitulacao')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div>
</div> </div>
</div> <div class="col-md-6">
<div class="col-md-6" > <div class="form-group" id="areaFormacao" style="display: none">
<div class="form-group" id="areaFormacao" style="display: none"> <label for="areaFormacao" class="col-form-label"
<label for="areaFormacao" class="col-form-label" style="font-weight:600;">{{ __('Área de Formação') }}<span style="color: red; font-weight:bold;">*</span></label> style="font-weight:600;">{{ __('Área de Formação') }}<span
<input id="areaFormacao" type="text" class="form-control @error('areaFormacao') is-invalid @enderror" name="areaFormacao" placeholder="Digite a sua área de formação" value="{{ old('areaFormacao') }}" autocomplete="nome"> style="color: red; font-weight:bold;">*</span></label>
<input id="areaFormacao" type="text"
@error('areaFormacao') class="form-control @error('areaFormacao') is-invalid @enderror"
<span class="invalid-feedback" role="alert"> name="areaFormacao" placeholder="Digite a sua área de formação"
value="{{ old('areaFormacao') }}" autocomplete="nome">
@error('areaFormacao')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div>
</div> </div>
</div> <div class="col-md-6">
<div class="col-md-6"> <div class="form-group" id="siape" style="display: none">
<div class="form-group" id="siape" style="display: none"> <label for="SIAPE" class="col-form-label"
<label for="SIAPE" class="col-form-label" style="font-weight:600;">{{ __('SIAPE') }}</label> style="font-weight:600;">{{ __('SIAPE') }}</label>
<input id="SIAPE" type="text" class="form-control @error('SIAPE') is-invalid @enderror" name="SIAPE" placeholder="Digite o SIAPE" value="{{ old('SIAPE') }}" autocomplete="nome"> <input id="SIAPE" type="text"
class="form-control @error('SIAPE') is-invalid @enderror" name="SIAPE"
@error('SIAPE') placeholder="Digite o SIAPE" value="{{ old('SIAPE') }}"
<span class="invalid-feedback" role="alert"> autocomplete="nome">
@error('SIAPE')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div>
</div> </div>
</div> <div class="col-md-6">
<div class="col-md-6"> <div class="form-group" id="bolsista" style="display: none">
<div class="form-group" id="bolsista" style="display: none"> <label for="bolsistaProdutividade" class="col-form-label"
<label for="bolsistaProdutividade" class="col-form-label" style="font-weight:600;">{{ __('Bolsista de Produtividade') }}<span style="color: red; font-weight:bold;">*</span></label><br> style="font-weight:600;">{{ __('Bolsista de Produtividade') }}<span
<select name="bolsistaProdutividade" id="bolsistaProdutividade" class="form-control @error('bolsistaProdutividade') is-invalid @enderror" onchange="mudarNivel()"> style="color: red; font-weight:bold;">*</span></label><br>
<option value="" disabled selected hidden>-- Bolsista --</option> <select name="bolsistaProdutividade" id="bolsistaProdutividade"
<option @if(old('bolsistaProdutividade')=='nao' ) selected @endif value="nao">Não</option> class="form-control @error('bolsistaProdutividade') is-invalid @enderror"
<option @if(old('bolsistaProdutividade')=='sim' ) selected @endif value="sim">Sim</option> onchange="mudarNivel()">
</select> <option value="" disabled selected hidden>-- Bolsista --</option>
@error('bolsistaProdutividade') <option @if(old('bolsistaProdutividade')=='nao' ) selected
<span class="invalid-feedback" role="alert"> @endif value="nao">Não
</option>
<option @if(old('bolsistaProdutividade')=='sim' ) selected
@endif value="sim">Sim
</option>
</select>
@error('bolsistaProdutividade')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div>
</div> </div>
</div> <div class="col-md-6">
<div class="col-md-6"> <div class="form-group" id="nivelInput" style="display: block;">
<div class="form-group" id="nivelInput" style="display: block;"> <label for="nivel" class="col-form-label"
<label for="nivel" class="col-form-label" style="font-weight:600;">{{ __('Nível') }}<span style="color: red; font-weight:bold;">*</span></label> style="font-weight:600;">{{ __('Nível') }}<span
<select name="nivel" id="nivel" class="form-control @error('nivel') is-invalid @enderror"> style="color: red; font-weight:bold;">*</span></label>
<option value="" disabled selected hidden></option> <select name="nivel" id="nivel"
<option value="1A">1A</option> class="form-control @error('nivel') is-invalid @enderror">
<option value="1B">1B</option> <option value="" disabled selected hidden></option>
<option value="1C">1C</option> <option value="1A">1A</option>
<option value="1D">1D</option> <option value="1B">1B</option>
<option value="2">2</option> <option value="1C">1C</option>
</select> <option value="1D">1D</option>
@error('nivel') <option value="2">2</option>
<span class="invalid-feedback" role="alert"> </select>
@error('nivel')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div>
</div> </div>
</div>
<!-- Estudante --> <!-- Estudante -->
<div class="col-md-6"> <div class="col-md-6">
<div class="form-group" id="dataNascimento"> <div class="form-group" id="dataNascimento">
@component('componentes.input', ['label' => 'Data de nascimento']) @component('componentes.input', ['label' => 'Data de nascimento'])
<input type="date" class="form-control" value="{{old('data_de_nascimento')}}" name="data_de_nascimento" placeholder="Data de nascimento" /> <input type="date" class="form-control"
@error('data_de_nascimento') value="{{old('data_de_nascimento')}}" name="data_de_nascimento"
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block"> placeholder="Data de nascimento"/>
@error('data_de_nascimento')
<span class="invalid-feedback" role="alert"
style="overflow: visible; display:block">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
@endcomponent @endcomponent
</div> </div>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<div class="form-group" id="curso"> <div class="form-group" id="curso">
@component('componentes.input', ['label' => 'Curso']) @component('componentes.input', ['label' => 'Curso'])
<select style="display: inline" class="form-control" id='cursoEstudante' name="cursoEstudante" onchange="outroCurso(this)"> <select style="display: inline" class="form-control" id='cursoEstudante'
<option value="" disabled selected hidden>-- Selecione uma opção--</option> name="cursoEstudante" onchange="outroCurso(this)">
@foreach ($cursos as $curso) <option value="" disabled selected hidden>-- Selecione uma opção--
<option @if(old('cursoEstudante')==$curso->id) selected @endif value='{{$curso->id}}'>{{$curso->nome}}</option> </option>
@endforeach @foreach ($cursos as $curso)
<option @if(old('cursoEstudante') == "Outro" ) selected @endif value="Outro">Outro</option> @if($curso->nome != 'Outro Curso')
</select> <option @if(old('cursoEstudante')==$curso->id) selected
@error('curso') @endif value='{{$curso->id}}'>{{$curso->nome}}</option>
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block"> @endif
@endforeach
<option @if(old('cursoEstudante') == "Outro" ) selected
@endif value="Outro">Outro
</option>
</select>
@error('curso')
<span class="invalid-feedback" role="alert"
style="overflow: visible; display:block">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
@endcomponent @endcomponent
</div> </div>
</div>
<div class="col-md-12">
<div class="form-group" id="divCursoEstudante" style="display:none">
@component('componentes.input', ['label' => 'Qual curso?'])
<input name="outroCursoEstudante" type="text" id="outroCursoEstudante" value="{{ old('outroCursoEstudante')}}" class="form-control"/>
@error('outroCursoEstudante')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block"><strong>{{ $message }}</strong></span>
@enderror
@endcomponent
</div> </div>
</div>
<div class="col-md-12" id='endereco'> <div class="col-md-12">
<div class="d-flex justify-content-between align-items-center" style="margin-bottom:6px"> <div class="form-group" id="divCursoEstudante" style="display:none">
<h5 class="card-title mb-0" style="font-size:20px; font-family:Arial, Helvetica, sans-serif; font-family:Arial, Helvetica, sans-serif; ">Endereço</h5> @component('componentes.input', ['label' => 'Qual curso?'])
<input name="outroCursoEstudante" type="text" id="outroCursoEstudante"
value="{{ old('outroCursoEstudante')}}" class="form-control"/>
@error('outroCursoEstudante')
<span class="invalid-feedback" role="alert"
style="overflow: visible; display:block"><strong>{{ $message }}</strong></span>
@enderror
@endcomponent
</div>
</div> </div>
</div>
<div class="col-md-6">
<div class="form-group" id="divCep"> <div class="col-md-12" id='endereco'>
@component('componentes.input', ['label' => 'CEP']) <div class="d-flex justify-content-between align-items-center"
<input name="cep" type="text" id="cep" value="{{ old('cep')}}" class="form-control cep" onblur="pesquisaCep(this.value)" /> style="margin-bottom:6px">
@error('cep') <h5 class="card-title mb-0"
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block"><strong>{{ $message }}</strong></span> style="font-size:20px; font-family:Arial, Helvetica, sans-serif; font-family:Arial, Helvetica, sans-serif; ">
@enderror Endereço</h5>
@endcomponent </div>
</div> </div>
</div> <div class="col-md-6">
<div class="col-md-6"> <div class="form-group" id="divCep">
<div class="form-group" id="divUf"> @component('componentes.input', ['label' => 'CEP'])
@component('componentes.input', ['label' => 'Estado']) <input name="cep" type="text" id="cep" value="{{ old('cep')}}"
<input name="uf" type="text" class="form-control" value="{{ old('uf')}}" id="uf" /> class="form-control cep" onblur="pesquisaCep(this.value)"/>
@error('uf') @error('cep')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block"><strong>{{ $message }}</strong></span> <span class="invalid-feedback" role="alert"
@enderror style="overflow: visible; display:block"><strong>{{ $message }}</strong></span>
@endcomponent @enderror
@endcomponent
</div>
</div> </div>
</div> <div class="col-md-6">
<div class="col-md-6"> <div class="form-group" id="divUf">
<div class="form-group" id="divCidade"> @component('componentes.input', ['label' => 'Estado'])
@component('componentes.input', ['label' => 'Cidade']) <input name="uf" type="text" class="form-control" value="{{ old('uf')}}"
<input name="cidade" type="text" id="cidade" class="form-control" value="{{ old('cidade')}}" /> id="uf"/>
@error('cidade') @error('uf')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block"><strong>{{ $message }}</strong></span> <span class="invalid-feedback" role="alert"
@enderror style="overflow: visible; display:block"><strong>{{ $message }}</strong></span>
@endcomponent @enderror
</div> @endcomponent
</div> </div>
<div class="col-md-6">
<div class="form-group" id="divBairro">
@component('componentes.input', ['label' => 'Bairro'])
<input name="bairro" type="text" id="bairro" class="form-control" value="{{ old('bairro')}}" />
@error('bairro')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block"><strong>{{ $message }}</strong></span>
@enderror
@endcomponent
</div>
</div>
<div class="col-md-6">
<div class="form-group" id='divRua'>
@component('componentes.input', ['label' => 'Rua'])
<input name="rua" type="text" id="rua" class="form-control" value="{{ old('rua')}}" />
@error('rua')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block"><strong>{{ $message }}</strong></span>
@enderror
@endcomponent
</div>
</div>
<div class="col-md-6">
<div class="form-group" id='numero'>
@component('componentes.input', ['label' => 'Número'])
<input name="numero" type="text" class="form-control" value="{{ old('numero')}}" />
@error('numero')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block"><strong>{{ $message }}</strong></span>
@enderror
@endcomponent
</div> </div>
</div> <div class="col-md-6">
<div class='col-md-12'> <div class="form-group" id="divCidade">
<div class="form-group" id='complemento'> @component('componentes.input', ['label' => 'Cidade'])
<label class=" control-label" for="firstname" style="font-weight:600;">Complemento</label> <input name="cidade" type="text" id="cidade" class="form-control"
<input type="text" class="form-control" value="{{old('complemento')}}" name="complemento" placeholder="Complemento" maxlength="75" id="complemento" /> value="{{ old('cidade')}}"/>
<span style="color: red; font-size: 12px" id="caracsRestantescomplemento"> @error('cidade')
<span class="invalid-feedback" role="alert"
style="overflow: visible; display:block"><strong>{{ $message }}</strong></span>
@enderror
@endcomponent
</div>
</div>
<div class="col-md-6">
<div class="form-group" id="divBairro">
@component('componentes.input', ['label' => 'Bairro'])
<input name="bairro" type="text" id="bairro" class="form-control"
value="{{ old('bairro')}}"/>
@error('bairro')
<span class="invalid-feedback" role="alert"
style="overflow: visible; display:block"><strong>{{ $message }}</strong></span>
@enderror
@endcomponent
</div>
</div>
<div class="col-md-6">
<div class="form-group" id='divRua'>
@component('componentes.input', ['label' => 'Rua'])
<input name="rua" type="text" id="rua" class="form-control"
value="{{ old('rua')}}"/>
@error('rua')
<span class="invalid-feedback" role="alert"
style="overflow: visible; display:block"><strong>{{ $message }}</strong></span>
@enderror
@endcomponent
</div>
</div>
<div class="col-md-6">
<div class="form-group" id='numero'>
@component('componentes.input', ['label' => 'Número'])
<input name="numero" type="text" class="form-control"
value="{{ old('numero')}}"/>
@error('numero')
<span class="invalid-feedback" role="alert"
style="overflow: visible; display:block"><strong>{{ $message }}</strong></span>
@enderror
@endcomponent
</div>
</div>
<div class='col-md-12'>
<div class="form-group" id='complemento'>
<label class=" control-label" for="firstname" style="font-weight:600;">Complemento</label>
<input type="text" class="form-control" value="{{old('complemento')}}"
name="complemento" placeholder="Complemento" maxlength="75"
id="complemento"/>
<span style="color: red; font-size: 12px" id="caracsRestantescomplemento">
</span> </span>
@error('complemento') @error('complemento')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block"> <span class="invalid-feedback" role="alert"
style="overflow: visible; display:block">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div>
</div> </div>
</div>
<div class="col-md-12">
<div class="form-group">
<label for="linkLattes" class="col-form-label" style="font-weight:600;">{{ __('Link do Currículo Lattes') }}<span style="color: red; font-weight:bold;">*</span></label>
<input id="linkLattes" type="text" class="form-control @error('linkLattes') is-invalid @enderror" name="linkLattes" placeholder="Digite o link do currículo Lattes" value="{{ old('linkLattes') }}" autocomplete="nome">
@error('linkLattes') <div class="col-md-12">
<span class="invalid-feedback" role="alert"> <div class="form-group">
<label for="linkLattes" class="col-form-label"
style="font-weight:600;">{{ __('Link do Currículo Lattes') }}<span
style="color: red; font-weight:bold;">*</span></label>
<input id="linkLattes" type="text"
class="form-control @error('linkLattes') is-invalid @enderror"
name="linkLattes" placeholder="Digite o link do currículo Lattes"
value="{{ old('linkLattes') }}" autocomplete="nome">
@error('linkLattes')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div>
</div> </div>
</div> <div class="col-md-12">
<div class="col-md-12"> <div class="d-flex justify-content-between align-items-center"
<div class="d-flex justify-content-between align-items-center" style="margin-bottom:6px"> style="margin-bottom:6px">
<h5 class="card-title mb-0" style="font-size:20px; font-family:Arial, Helvetica, sans-serif; font-family:Arial, Helvetica, sans-serif; ">Acesso ao sistema</h5> <h5 class="card-title mb-0"
style="font-size:20px; font-family:Arial, Helvetica, sans-serif; font-family:Arial, Helvetica, sans-serif; ">
Acesso ao sistema</h5>
</div>
</div> </div>
</div> <div class="col-md-6">
<div class="col-md-6"> <div class="form-group">
<div class="form-group"> <label for="email" class="col-form-label"
<label for="email" class="col-form-label" style="font-weight:600;">{{ __('E-Mail') }}<span style="color: red; font-weight:bold;">*</span></label> style="font-weight:600;">{{ __('E-Mail') }}<span
<input id="email" type="email" class="form-control @error('email') is-invalid @enderror" name="email" placeholder="Digite o seu e-mail" value="{{ old('email') }}" required autocomplete="email"> style="color: red; font-weight:bold;">*</span></label>
<input id="email" type="email"
@error('email') class="form-control @error('email') is-invalid @enderror" name="email"
<span class="invalid-feedback" role="alert"> placeholder="Digite o seu e-mail" value="{{ old('email') }}" required
autocomplete="email">
@error('email')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div>
</div> </div>
</div> <div class="col-md-6">
<div class="col-md-6"> <div class="form-group">
<div class="form-group"> <label for="password" class="col-form-label"
<label for="password" class="col-form-label" style="font-weight:600;">{{ __('Senha') }}<span style="color: red; font-weight:bold;">*</span></label> style="font-weight:600;">{{ __('Senha') }}<span
<input id="password" type="password" class="form-control @error('password') is-invalid @enderror" name="password" placeholder="Digite sua senha" required autocomplete="new-password"> style="color: red; font-weight:bold;">*</span></label>
<input id="password" type="password"
@error('password') class="form-control @error('password') is-invalid @enderror"
<span class="invalid-feedback" role="alert"> name="password" placeholder="Digite sua senha" required
autocomplete="new-password">
@error('password')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
<small>Deve ter no mínimo 8 caracteres</small> <small>Deve ter no mínimo 8 caracteres</small>
</div>
</div> </div>
</div> <div class="col-md-6">
<div class="col-md-6"> <div class="form-group">
<div class="form-group"> <label for="password-confirm" class="col-form-label"
<label for="password-confirm" class="col-form-label" style="font-weight:600;">{{ __('Confirme a Senha') }}<span style="color: red; font-weight:bold;">*</span></label> style="font-weight:600;">{{ __('Confirme a Senha') }}<span
<input id="password-confirm" type="password" class="form-control" name="password_confirmation" placeholder="Confirme sua senha" required autocomplete="new-password"> style="color: red; font-weight:bold;">*</span></label>
<input id="password-confirm" type="password" class="form-control"
name="password_confirmation" placeholder="Confirme sua senha" required
autocomplete="new-password">
</div>
</div> </div>
</div> <div class="col-md-12">
<div class="col-md-12"> <div class="form-group" id="nivelInput" style="display: block; text-align:right">
<div class="form-group" id="nivelInput" style="display: block; text-align:right"> <hr>
<hr> <button type="submit" class="btn btn-success botao-form" style="">
<button type="submit" class="btn btn-success botao-form" style=""> {{ __('Finalizar Cadastro') }}
{{ __('Finalizar Cadastro') }} </button>
</button> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </form>
</form> </div>
</div>
@endsection @endsection
@section('javascript') @section('javascript')
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function($) { $(document).ready(function ($) {
$('#cpf').mask('000.000.000-00'); $('#cpf').mask('000.000.000-00');
var SPMaskBehavior = function(val) { var SPMaskBehavior = function (val) {
return val.replace(/\D/g, '').length === 11 ? '(00) 00000-0000' : '(00) 0000-00009'; return val.replace(/\D/g, '').length === 11 ? '(00) 00000-0000' : '(00) 0000-00009';
}, },
spOptions = { spOptions = {
onKeyPress: function(val, e, field, options) { onKeyPress: function (val, e, field, options) {
field.mask(SPMaskBehavior.apply({}, arguments), options); field.mask(SPMaskBehavior.apply({}, arguments), options);
}
};
$('#celular').mask(SPMaskBehavior, spOptions);
$('#SIAPE').mask('00000000');
$('#AnoTitulacao').mask('0000');
$('#cep').mask('00000-000');
});
function mudarPerfil() {
var divDataNascimento = document.getElementById('dataNascimento');
var divCurso = document.getElementById('curso');
var divEndereco = document.getElementById('endereco');
var divCep = document.getElementById('divCep');
var divUf = document.getElementById('divUf');
var divCidade = document.getElementById('divCidade');
var divBairro = document.getElementById('divBairro');
var divRua = document.getElementById('divRua');
var divNumero = document.getElementById('numero');
var divComplemento = document.getElementById('complemento');
var divCursos = document.getElementById('divCursos');
var divVinculo = document.getElementById('divVinculo');
var divTitulacaoMax = document.getElementById('divTitulacaoMax');
var divAnoTitulacao = document.getElementById('anoTitulacao');
var divAreaFormacao = document.getElementById('areaFormacao');
var divSIAPE = document.getElementById('siape');
var divBolsista = document.getElementById('bolsista');
var divNivel = document.getElementById('nivelInput');
var divOutroVinculo = document.getElementById('divOutro');
var comboBoxPerfil = document.getElementById('perfil');
if (comboBoxPerfil.value === "Professor" || comboBoxPerfil.value === "Técnico" || comboBoxPerfil.value === "Outro") {
divVinculo.style.display = "block";
divTitulacaoMax.style.display = "block";
divAnoTitulacao.style.display = "block";
divAreaFormacao.style.display = "block";
divSIAPE.style.display = "block";
divBolsista.style.display = "block";
if (comboBoxPerfil.value === "Professor") {
divCursos.style.display = "block";
} else {
divCursos.style.display = "none";
} }
};
$('#celular').mask(SPMaskBehavior, spOptions);
$('#SIAPE').mask('00000000');
$('#AnoTitulacao').mask('0000');
$('#cep').mask('00000-000');
});
function mudarPerfil() {
var divDataNascimento = document.getElementById('dataNascimento');
var divCurso = document.getElementById('curso');
var divEndereco = document.getElementById('endereco');
var divCep = document.getElementById('divCep');
var divUf = document.getElementById('divUf');
var divCidade = document.getElementById('divCidade');
var divBairro = document.getElementById('divBairro');
var divRua = document.getElementById('divRua');
var divNumero = document.getElementById('numero');
var divComplemento = document.getElementById('complemento');
var divCursos = document.getElementById('divCursos');
var divVinculo = document.getElementById('divVinculo');
var divTitulacaoMax = document.getElementById('divTitulacaoMax');
var divAnoTitulacao = document.getElementById('anoTitulacao');
var divAreaFormacao = document.getElementById('areaFormacao');
var divSIAPE = document.getElementById('siape');
var divBolsista = document.getElementById('bolsista');
var divNivel = document.getElementById('nivelInput');
var divOutroVinculo = document.getElementById('divOutro');
var comboBoxPerfil = document.getElementById('perfil');
if(comboBoxPerfil.value === "Professor" || comboBoxPerfil.value === "Técnico" || comboBoxPerfil.value === "Outro"){
divVinculo.style.display = "block";
divTitulacaoMax.style.display = "block";
divAnoTitulacao.style.display = "block";
divAreaFormacao.style.display = "block";
divSIAPE.style.display = "block";
divBolsista.style.display = "block";
if (comboBoxPerfil.value === "Professor"){
divCursos.style.display = "block";
} else { } else {
divVinculo.style.display = "none";
divTitulacaoMax.style.display = "none";
divAnoTitulacao.style.display = "none";
divAreaFormacao.style.display = "none";
divSIAPE.style.display = "none";
divBolsista.style.display = "none";
divCursos.style.display = "none"; divCursos.style.display = "none";
} }
if (comboBoxPerfil.value === "Estudante") {
divDataNascimento.style.display = "block";
divCurso.style.display = "block";
divEndereco.style.display = "block";
divCep.style.display = "block";
divUf.style.display = "block";
divCidade.style.display = "block";
divBairro.style.display = "block";
divRua.style.display = "block";
divNumero.style.display = "block";
divComplemento.style.display = "block";
divNivel.style.display = "none";
divOutroVinculo.style.display = "none";
} else { } else {
divVinculo.style.display = "none"; divDataNascimento.style.display = "none";
divTitulacaoMax.style.display = "none"; divCurso.style.display = "none";
divAnoTitulacao.style.display = "none"; divEndereco.style.display = "none";
divAreaFormacao.style.display = "none"; divCep.style.display = "none";
divSIAPE.style.display = "none"; divUf.style.display = "none";
divBolsista.style.display = "none"; divCidade.style.display = "none";
divCursos.style.display = "none"; divBairro.style.display = "none";
} divRua.style.display = "none";
divNumero.style.display = "none";
if(comboBoxPerfil.value === "Estudante"){ divComplemento.style.display = "none";
divDataNascimento.style.display = "block"; }
divCurso.style.display = "block";
divEndereco.style.display = "block"; outroPerfil();
divCep.style.display = "block"; outroVinculo();
divUf.style.display = "block";
divCidade.style.display = "block";
divBairro.style.display = "block";
divRua.style.display = "block";
divNumero.style.display = "block";
divComplemento.style.display = "block";
divNivel.style.display = "none";
divOutroVinculo.style.display = "none";
} else {
divDataNascimento.style.display = "none";
divCurso.style.display = "none";
divEndereco.style.display = "none";
divCep.style.display = "none";
divUf.style.display = "none";
divCidade.style.display = "none";
divBairro.style.display = "none";
divRua.style.display = "none";
divNumero.style.display = "none";
divComplemento.style.display = "none";
} }
outroPerfil(); function outroCurso() {
outroVinculo(); var comboBoxCurso = document.getElementById('cursoEstudante');
} var divCurso = document.getElementById('divCursoEstudante');
if (comboBoxCurso.value === "Outro") {
divCurso.style.display = "block";
} else {
divCurso.style.display = "none";
}
}
function outroCurso(){ function outroPerfil() {
var comboBoxCurso = document.getElementById('cursoEstudante'); var comboBoxPerfil = document.getElementById('perfil');
var divCurso = document.getElementById('divCursoEstudante'); var divOutro = document.getElementById('outroPerfil');
if (comboBoxCurso.value === "Outro") { if (comboBoxPerfil.value === "Outro") {
divCurso.style.display = "block"; divOutro.style.display = "block";
} else { } else {
divCurso.style.display = "none"; divOutro.style.display = "none";
}
} }
}
function outroPerfil() { function outroVinculo() {
var comboBoxPerfil = document.getElementById('perfil'); var comboBoxVinculo = document.getElementById('vinculo');
var divOutro = document.getElementById('outroPerfil'); var divOutro = document.getElementById('divOutro');
if (comboBoxPerfil.value === "Outro") { if (comboBoxVinculo.value === "Outro" && document.getElementById('perfil').value !== "Estudante") {
divOutro.style.display = "block"; divOutro.style.display = "block";
} else { } else {
divOutro.style.display = "none"; divOutro.style.display = "none";
}
} }
}
function outroVinculo() { function mudarNivel() {
var comboBoxVinculo = document.getElementById('vinculo'); var bolsista = document.getElementById('bolsistaProdutividade');
var divOutro = document.getElementById('divOutro'); var nivel = document.getElementById('nivelInput');
if (comboBoxVinculo.value === "Outro" && document.getElementById('perfil').value !== "Estudante") { if (bolsista.value === "sim") {
divOutro.style.display = "block"; nivel.style.display = "block";
} else { } else {
divOutro.style.display = "none"; nivel.style.display = "none";
}
} }
}
function mudarNivel() { function showInstituicao() {
var bolsista = document.getElementById('bolsistaProdutividade'); var instituicao = document.getElementById('instituicao');
var nivel = document.getElementById('nivelInput'); var instituicaoSelect = document.getElementById('instituicaoSelect');
var divOutroCurso = document.getElementById('divOutroCurso');
if (instituicaoSelect.value === "Outra") {
document.getElementById("displayOutro").style.display = "block";
divOutroCurso.style.display = "block";
instituicao.parentElement.style.display = '';
document.getElementById('instituicao').value = "";
} else if (instituicaoSelect.value === "UFAPE") {
document.getElementById("displayOutro").style.display = "none";
}
if(instituicaoSelect.value != "Outra")
{
divOutroCurso.style.display = "none";
}
}
if (bolsista.value === "sim") { function onload() {
nivel.style.display = "block"; mudarNivel();
} else { outroVinculo();
nivel.style.display = "none"; mudarPerfil();
showInstituicao();
outroCurso();
} }
}
window.onload = onload();
function showInstituicao() { </script>
var instituicao = document.getElementById('instituicao');
var instituicaoSelect = document.getElementById('instituicaoSelect'); <script>
//----------------------------- Scripts para auto-complete de endereço --------------------------------//
if (instituicaoSelect.value === "Outra") {
document.getElementById("displayOutro").style.display = "block"; function limpa_formulário_cep() {
instituicao.parentElement.style.display = ''; //Limpa valores do formulário de cep.
document.getElementById('instituicao').value = ""; document.getElementById(`rua`).value = ("");
} else if (instituicaoSelect.value === "UFAPE") { document.getElementById(`bairro`).value = ("");
document.getElementById("displayOutro").style.display = "none"; document.getElementById(`cidade`).value = ("");
document.getElementById(`uf`).value = ("");
//document.getElementById('ibge').value=("");
} }
}
function meu_callback(conteudo) {
function onload() { if (!("erro" in conteudo)) {
mudarNivel(); //Atualiza os campos com os valores.
outroVinculo(); document.getElementById(`rua`).value = (conteudo.logradouro);
mudarPerfil(); document.getElementById(`bairro`).value = (conteudo.bairro);
showInstituicao(); document.getElementById(`cidade`).value = (conteudo.localidade);
outroCurso(); document.getElementById(`uf`).value = (conteudo.uf);
}
window.onload = onload();
</script> //document.getElementById('ibge').value=(conteudo.ibge);
} //end if.
<script> else {
//----------------------------- Scripts para auto-complete de endereço --------------------------------// //CEP não Encontrado.
limpa_formulário_cep();
function limpa_formulário_cep() { alert("CEP não encontrado.");
//Limpa valores do formulário de cep. }
document.getElementById(`rua`).value = ("");
document.getElementById(`bairro`).value = ("");
document.getElementById(`cidade`).value = ("");
document.getElementById(`uf`).value = ("");
//document.getElementById('ibge').value=("");
}
function meu_callback(conteudo) {
if (!("erro" in conteudo)) {
//Atualiza os campos com os valores.
document.getElementById(`rua`).value = (conteudo.logradouro);
document.getElementById(`bairro`).value = (conteudo.bairro);
document.getElementById(`cidade`).value = (conteudo.localidade);
document.getElementById(`uf`).value = (conteudo.uf);
//document.getElementById('ibge').value=(conteudo.ibge);
} //end if.
else {
//CEP não Encontrado.
limpa_formulário_cep();
alert("CEP não encontrado.");
} }
}
function pesquisaCep(valor) { function pesquisaCep(valor) {
//Nova variável "cep" somente com dígitos. //Nova variável "cep" somente com dígitos.
var cep = valor.replace(/\D/g, ''); var cep = valor.replace(/\D/g, '');
//Verifica se campo cep possui valor informado. //Verifica se campo cep possui valor informado.
if (cep != "") { if (cep != "") {
//Expressão regular para validar o CEP. //Expressão regular para validar o CEP.
var validacep = /^[0-9]{8}$/; var validacep = /^[0-9]{8}$/;
//Valida o formato do CEP. //Valida o formato do CEP.
if (validacep.test(cep)) { if (validacep.test(cep)) {
//Preenche os campos com "..." enquanto consulta webservice. //Preenche os campos com "..." enquanto consulta webservice.
document.getElementById(`rua`).value = "..."; document.getElementById(`rua`).value = "...";
document.getElementById(`bairro`).value = "..."; document.getElementById(`bairro`).value = "...";
document.getElementById(`cidade`).value = "..."; document.getElementById(`cidade`).value = "...";
document.getElementById(`uf`).value = "..."; document.getElementById(`uf`).value = "...";
//document.getElementById('ibge').value="..."; //document.getElementById('ibge').value="...";
//Cria um elemento javascript. //Cria um elemento javascript.
var script = document.createElement('script'); var script = document.createElement('script');
//Sincroniza com o callback. //Sincroniza com o callback.
script.src = 'https://viacep.com.br/ws/' + cep + '/json/?callback=meu_callback'; script.src = 'https://viacep.com.br/ws/' + cep + '/json/?callback=meu_callback';
//Insere script no documento e carrega o conteúdo. //Insere script no documento e carrega o conteúdo.
document.body.appendChild(script); document.body.appendChild(script);
} //end if.
else {
//cep é inválido.
limpa_formulário_cep();
alert("Formato de CEP inválido.");
}
} //end if. } //end if.
else { else {
//cep é inválido. //cep sem valor, limpa formulário.
limpa_formulário_cep(); limpa_formulário_cep();
alert("Formato de CEP inválido.");
} }
} //end if. };
else { </script>
//cep sem valor, limpa formulário.
limpa_formulário_cep();
}
};
</script>
@endsection @endsection
\ No newline at end of file
...@@ -132,6 +132,44 @@ ...@@ -132,6 +132,44 @@
</div> </div>
</div> </div>
@endif @endif
@if($edital->tipo == "PIBIC" && $edital->natureza_id == 2)
<div class="form-group col-md-6">
<label for="botao" class="col-form-label font-tam @error('botao') is-invalid @enderror" data-toggle="tooltip" data-placement="bottom" title="Se possuir, coloque todas em único arquivo pdf." style="font-weight: bold;">
O questionário de pesquisa de prospecção interna foi respondido?<span style="color: red; font-weight:bold"> *</span>
</label>
<input type="radio" id="formSim" name="preenchimentoFormFlag" value="sim">
<label for="formSim" style="margin-right: 5px">Sim</label>
<input type="radio" id="formNao" name="preenchimentoFormFlag" value="nao" checked>
<label for="formNao" style="margin-right: 5px;">Não</label><br>
<a href="https://forms.gle/cAND8Z3z1yVr9u6a6" target="_blank" style="margin: 0px;">(endereço eletrônico de acesso)</a>
</div>
<div class="form-group col-md-6">
<label for="botao" class="col-form-label font-tam @error('botao') is-invalid @enderror" data-toggle="tooltip" data-placement="bottom" title="Se possuir, coloque todas em único arquivo pdf." style="font-weight: bold">{{ __('Possui estudante(s) de ações afirmativas?') }} </label>
<input type="radio" id="radioAcoesAfirmativasSim" name="radioAcoesAfirmativas" onchange="displayAcoesAfirmativas('sim')" value="sim">
<label for="radioSim" style="margin-right: 5px">Sim</label>
<input type="radio" id="radioAcoesAfirmativasNao" name="radioAcoesAfirmativas" onchange="displayAcoesAfirmativas('nao')" checked
value="nao">
<label for="radioNao" style="margin-right: 5px" >Não</label><br>
<div class="form-group" id="displayAcoesAfirmativas" style="display: none; margin-top:-1rem">
<label for="nomeTrabalho" class="col-form-label font-tam" style="font-weight: bold;font-size: 13px">{{ __('Declaração de ação afirmativa') }}<span style="color: red; font-weight:bold"> *</span></label>
<input type="file" class="input-group-text" name="anexo_acao_afirmativa" accept=".pdf" />
@error('anexoAcaoAfirmativa')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div>
@endif
@if($edital->nome_docExtra != null) @if($edital->nome_docExtra != null)
<div class="form-group col-md-6"> <div class="form-group col-md-6">
<label title="{{$edital->nome_docExtra}}" for="anexo_docExtra" class="col-form-label font-tam" style="font-weight: bold">{{$edital->nome_docExtra}}: @if($edital->obrigatoriedade_docExtra == true) <span style="color: red; font-weight:bold">*</span> @endif</label> <label title="{{$edital->nome_docExtra}}" for="anexo_docExtra" class="col-form-label font-tam" style="font-weight: bold">{{$edital->nome_docExtra}}: @if($edital->obrigatoriedade_docExtra == true) <span style="color: red; font-weight:bold">*</span> @endif</label>
...@@ -176,4 +214,12 @@ ...@@ -176,4 +214,12 @@
} }
} }
function displayAcoesAfirmativas(valor) {
if(valor == "sim"){
document.getElementById("displayAcoesAfirmativas").style.display = "block";
}else {
document.getElementById("displayAcoesAfirmativas").style.display = "none";
}
}
</script> </script>
\ No newline at end of file
<div class="col-md-12" style="margin-top: 20px"> <div class="col-md-12" style="margin-top: 20px">
<div class="card" style="border-radius: 5px"> <div class="card" style="border-radius: 5px">
<div class="card-body" style="padding-top: 0.2rem;"> <div class="card-body" style="padding-top: 0.2rem;">
<div class="container"> <div class="container">
<div class="form-row mt-3"> <div class="form-row mt-3">
<div class="col-md-11"> <div class="col-md-11">
<h5 style="color: #234B8B; font-weight: bold">Adicionar Integrante(s)</h5> <h5 style="color: #234B8B; font-weight: bold">Adicionar Integrante(s)</h5>
</div> </div>
<div class="col-md-1 text-sm-right"> <div class="col-md-1 text-sm-right">
<a type="button" value="{{ $edital->id }}" id="atribuir1" data-toggle="modal" data-target="#modalIntegrante"> <a type="button" value="{{ $edital->id }}" id="atribuir1" data-toggle="modal"
data-target="#modalIntegrante">
<img class="" src="{{asset('img/icons/add.ico')}}" style="width:30px" alt=""> <img class="" src="{{asset('img/icons/add.ico')}}" style="width:30px" alt="">
</a> </a>
</div> </div>
</div> </div>
<hr style="border-top: 1px solid#1492E6"> <hr style="border-top: 1px solid#1492E6">
<!-- <h6 style="color: #234B8B; font-weight: bold;">Integrantes</h6> --> <!-- <h6 style="color: #234B8B; font-weight: bold;">Integrantes</h6> -->
<div class="row" id="integrante" style="display:none"> <div class="row" id="integrante" style="display:none">
</div> </div>
@include('evento.formulario.participantes') @include('evento.formulario.participantes')
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<!-- MODAL --> <!-- MODAL -->
<div class="modal fade" id="modalIntegrante" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div class="modal fade" id="modalIntegrante" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
<div class="modal-dialog modal-dialog-centered modal-sm"> aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal-sm">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Adicionar Integrante</h5> <h5 class="modal-title" id="exampleModalLabel">Adicionar Integrante</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> <button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
</button> </button>
</div> </div>
<div class="container"> <div class="container">
<div class="row justify-content-center" style="padding-left:35px; padding-right:45px"> <div class="row justify-content-center" style="padding-left:35px; padding-right:45px">
<div class="form-controll" style="margin-left:10px; margin-top:10px; margin-bottom:15px; font-weight:bold;"> <div class="form-controll"
style="margin-left:10px; margin-top:10px; margin-bottom:15px; font-weight:bold;">
<div class="form-row d-flex"> <div class="form-row d-flex">
<label for="cpf_consulta">CPF:</label> <label for="cpf_consulta">CPF:</label>
<input type="text" id="cpf_consulta" name="cpf_consulta" class="form-control"> <input type="text" id="cpf_consulta" name="cpf_consulta" class="form-control">
</div> </div>
<div class="form-row d-flex" style="margin-top:10px"> <div class="form-row d-flex" style="margin-top:10px">
<label for="funcao_participante">Função do Integrante:</label> <label for="funcao_participante">Função do Integrante:</label>
<select name="" id="funcao_participante" class="form-control"> <select name="" id="funcao_participante" class="form-control">
@foreach($funcaoParticipantes as $funcao) @foreach($funcaoParticipantes as $funcao)
@if($edital->natureza_id == 3) <!-- EXTENSÃO -->
@if($edital->tipo == "CONTINUO" && $funcao->nome != 'Bolsista') @if($edital->natureza_id == 3 && $edital->tipo == "CONTINUO")
@if($funcao->nome == "Vice-coordenador" || $funcao->nome == "Colaborador")
<option value="{{$funcao->id}}">{{ $funcao->nome }}</option>
@endif
@elseif($edital->natureza_id == 3 && $edital->tipo == "PIBEX")
@if($funcao->nome == "Vice-coordenador" || $funcao->nome == "Colaborador" || $funcao->nome == "Bolsista")
<option value="{{$funcao->id}}">{{ $funcao->nome }}</option> <option value="{{$funcao->id}}">{{ $funcao->nome }}</option>
@elseif($funcao->nome != "Consultor" && $funcao->nome != "Pesquisador" && $funcao->nome != "Voluntário") @endif
<!-- PESQUISA -->
@else
@if($funcao->nome == "Bolsista" || $funcao->nome == "Voluntário")
<option value="{{$funcao->id}}">{{ $funcao->nome }}</option> <option value="{{$funcao->id}}">{{ $funcao->nome }}</option>
@endif @endif
@else
<option value="{{$funcao->id}}">{{ $funcao->nome }}</option>
@endif @endif
@endforeach @endforeach
</select> </select>
</div> </div>
<div class="form-row justify-content-center" style="margin-top:20px;"> <div class="form-row justify-content-center" style="margin-top:20px;">
<button type="button" class="btn btn-primary" onclick="preencherUsuarioExistente()">Adicionar</button> <button type="button" class="btn btn-primary" onclick="preencherUsuarioExistente()">
Adicionar
</button>
</div> </div>
</div> </div>
</div> </div>
...@@ -75,14 +85,15 @@ ...@@ -75,14 +85,15 @@
<!-- MODAL DE ERRO --> <!-- MODAL DE ERRO -->
<div class="modal fade" id="aviso-modal-usuario-nao-existe" data-backdrop="static" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div class="modal fade" id="aviso-modal-usuario-nao-existe" data-backdrop="static" tabindex="-1"
aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header" style="background-color: #dc3545;"> <div class="modal-header" style="background-color: #dc3545;">
<h5 class="modal-title" id="exampleModalLabel" style="color: white;">Aviso</h5> <h5 class="modal-title" id="exampleModalLabel" style="color: white;">Aviso</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> <button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
</button> </button>
</div> </div>
<div class="modal-body"> <div class="modal-body">
CPF não consta no sistema! CPF não consta no sistema!
...@@ -94,14 +105,15 @@ ...@@ -94,14 +105,15 @@
</div> </div>
</div> </div>
<div class="modal fade" id="aviso-modal-usuario-adicionado" data-backdrop="static" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div class="modal fade" id="aviso-modal-usuario-adicionado" data-backdrop="static" tabindex="-1"
aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header" style="background-color: #32CD32;"> <div class="modal-header" style="background-color: #32CD32;">
<h5 class="modal-title" id="exampleModalLabel" style="color: white;">Sucesso!</h5> <h5 class="modal-title" id="exampleModalLabel" style="color: white;">Sucesso!</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> <button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
</button> </button>
</div> </div>
<div class="modal-body"> <div class="modal-body">
Integrante adicionado com sucesso Integrante adicionado com sucesso
...@@ -113,16 +125,17 @@ ...@@ -113,16 +125,17 @@
</div> </div>
</div> </div>
<div class="modal fade" id="aviso-modal-limite-de-integrantes" data-backdrop="static" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div class="modal fade" id="aviso-modal-limite-de-integrantes" data-backdrop="static" tabindex="-1"
aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header" style="background-color: #dc3545;"> <div class="modal-header" style="background-color: #dc3545;">
<h5 class="modal-title" id="exampleModalLabel" style="color: white;">Aviso</h5> <h5 class="modal-title" id="exampleModalLabel" style="color: white;">Aviso</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> <button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
</button> </button>
</div> </div>
<div class="modal-body" > <div class="modal-body">
<span id="texto-erro">O limite de integrantes para esse projeto foi atingido.</span> <span id="texto-erro">O limite de integrantes para esse projeto foi atingido.</span>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
...@@ -133,7 +146,6 @@ ...@@ -133,7 +146,6 @@
</div> </div>
<script> <script>
$(document).ready(function () { $(document).ready(function () {
$("#cpf_consulta").mask("999.999.999-99"); $("#cpf_consulta").mask("999.999.999-99");
...@@ -144,7 +156,7 @@ ...@@ -144,7 +156,7 @@
} }
function preencherUsuarioExistente() { function preencherUsuarioExistente() {
if(!document.getElementById(`exampleModal${modal_id}`)){ if (!document.getElementById(`exampleModal${modal_id}`)) {
exibirModalNumeroMaximoDeIntegrantes(); exibirModalNumeroMaximoDeIntegrantes();
return; return;
} }
...@@ -155,29 +167,29 @@ ...@@ -155,29 +167,29 @@
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
} }
}); });
$.ajax({ $.ajax({
url: '{{ route('trabalho.buscarUsuario') }}', url: '{{ route('trabalho.buscarUsuario') }}',
type: 'POST', type: 'POST',
dataType: 'json', dataType: 'json',
data: { data: {
'cpf_consulta': $('#cpf_consulta').val(), 'cpf_consulta': $('#cpf_consulta').val(),
'funcao': $('#funcao_participante').val() 'funcao': $('#funcao_participante').val()
}, },
success: function (data) { success: function (data) {
if(data == 'inexistente' || $('#cpf_consulta').val() == ""){ if (data == 'inexistente' || $('#cpf_consulta').val() == "") {
exibirModalUsuarioInexistente(); exibirModalUsuarioInexistente();
}else {
if(data[0].tipo == 'participante'){
exibirUsuarioAdicionado(data);
} else { } else {
marcar(modal_id, data); if ($('#funcao_participante').val() != 4 || data[0].tipo == 'participante') {
exibirProfessorAdicionado(); exibirUsuarioAdicionado(data);
} else {
marcar(modal_id, data);
exibirProfessorAdicionado();
}
} }
} }
}
}); });
} }
...@@ -193,68 +205,81 @@ ...@@ -193,68 +205,81 @@
let modal_id = Number(document.getElementById('quantidadeModais').value); let modal_id = Number(document.getElementById('quantidadeModais').value);
function exibirUsuarioAdicionado(data) { function exibirUsuarioAdicionado(data) {
$('#modalIntegrante').modal('hide'); console.log(data[0])
$('#modalIntegrante').modal('hide');
document.getElementById(`nome${modal_id}`).value = data[0]['name']; document.getElementById(`nome${modal_id}`).value = data[0]['name'];
document.getElementById(`nome${modal_id}`).setAttribute("readonly", ""); document.getElementById(`nome${modal_id}`).setAttribute("readonly", "");
document.getElementById(`email${modal_id}`).value = data[0]['email']; document.getElementById(`email${modal_id}`).value = data[0]['email'];
document.getElementById(`email${modal_id}`).setAttribute("readonly", ""); document.getElementById(`email${modal_id}`).setAttribute("readonly", "");
let [y, m, d] = data[2]['data_de_nascimento'].split('-'); if (data[0]['tipo'] == "participante") {
let [y, m, d] = data[2]['data_de_nascimento'].split('-');
document.getElementById(`data_de_nascimento${modal_id}`).value = (new Date(y, m - 1, d)).toLocaleDateString();
document.getElementById(`data_de_nascimento${modal_id}`).setAttribute("readonly", "");
} else {
document.getElementById(`data_de_nascimento${modal_id}`).value = null;
document.getElementById(`data_de_nascimento${modal_id}`).setAttribute("readonly", "");
}
document.getElementById(`data_de_nascimento${modal_id}`).value = (new Date(y,m-1,d)).toLocaleDateString();
document.getElementById(`data_de_nascimento${modal_id}`).setAttribute("readonly", "");
document.getElementById(`cpf${modal_id}`).value = data[0]['cpf']; document.getElementById(`cpf${modal_id}`).value = data[0]['cpf'];
document.getElementById(`cpf${modal_id}`).setAttribute("readonly", ""); document.getElementById(`cpf${modal_id}`).setAttribute("readonly", "");
document.getElementById(`rg${modal_id}`).value = data[2]['rg'];
document.getElementById(`rg${modal_id}`).setAttribute("readonly", "");
document.getElementById(`celular${modal_id}`).value = data[0]['celular'];
document.getElementById(`celular${modal_id}`).setAttribute("readonly", "");
document.getElementById(`cep${modal_id}`).value = data[3]['cep']; if (data?.[2]?.rg) {
document.getElementById(`cep${modal_id}`).setAttribute("readonly", ""); document.getElementById(`rg${modal_id}`).value = data[2]['rg'];
document.getElementById(`rg${modal_id}`).setAttribute("readonly", "");
}
document.getElementById(`uf${modal_id}`).value = data[3]['uf']; if (data?.[0]?.celular) {
document.getElementById(`uf${modal_id}`).setAttribute("readonly", ""); document.getElementById(`celular${modal_id}`).value = data[0]['celular'];
document.getElementById(`celular${modal_id}`).setAttribute("readonly", "");
}
document.getElementById(`cidade${modal_id}`).value = data[3]['cidade']; if (data[3] != null) {
document.getElementById(`cidade${modal_id}`).setAttribute("readonly", ""); document.getElementById(`cep${modal_id}`).value = data[3].cep;
document.getElementById(`cep${modal_id}`).setAttribute("readonly", "");
document.getElementById(`bairro${modal_id}`).value = data[3]['bairro'];
document.getElementById(`bairro${modal_id}`).setAttribute("readonly", "");
document.getElementById(`rua${modal_id}`).value = data[3]['rua']; document.getElementById(`uf${modal_id}`).value = data[3].uf;
document.getElementById(`rua${modal_id}`).setAttribute("readonly", ""); document.getElementById(`uf${modal_id}`).setAttribute("readonly", "");
document.getElementById(`numero${modal_id}`).value = data[3]['numero']; document.getElementById(`cidade${modal_id}`).value = data[3].cidade;
document.getElementById(`numero${modal_id}`).setAttribute("readonly", ""); document.getElementById(`cidade${modal_id}`).setAttribute("readonly", "");
document.getElementById(`complemento${modal_id}`).value = data[3]['complemento']; document.getElementById(`bairro${modal_id}`).value = data[3].bairro;
document.getElementById(`complemento${modal_id}`).setAttribute("readonly", ""); document.getElementById(`bairro${modal_id}`).setAttribute("readonly", "");
document.getElementById(`rua${modal_id}`).value = data[3].rua;
document.getElementById(`rua${modal_id}`).setAttribute("readonly", "");
document.getElementById(`numero${modal_id}`).value = data[3].numero;
document.getElementById(`numero${modal_id}`).setAttribute("readonly", "");
document.getElementById(`complemento${modal_id}`).value = data[3].complemento;
document.getElementById(`complemento${modal_id}`).setAttribute("readonly", "");
}
document.getElementById(`instituicao[${modal_id}]`).value = data[0]['instituicao']; document.getElementById(`instituicao[${modal_id}]`).value = data[0].instituicao;
document.getElementById(`instituicao[${modal_id}]`).setAttribute("readonly", ""); document.getElementById(`instituicao[${modal_id}]`).setAttribute("readonly", "");
document.getElementById(`curso[${modal_id}]`).value = data[2]['curso']; document.getElementById(`curso[${modal_id}]`).value = data[2].curso;
document.getElementById(`curso[${modal_id}]`).setAttribute("readonly", ""); document.getElementById(`curso[${modal_id}]`).setAttribute("readonly", "");
console.log(document.getElementById(`funcaoParticipante${modal_id}`)); console.log(document.getElementById(`funcaoParticipante${modal_id}`));
document.getElementById(`funcaoParticipante${modal_id}`).value = data[1]['nome']; document.getElementById(`funcaoParticipante${modal_id}`).value = data[1]['nome'];
if(data[1].nome != "Bolsista" && data[1].nome != "Voluntário"){ if (data[1].nome != "Bolsista" && data[1].nome != "Voluntário") {
console.log(document.getElementById(`plano-titulo${modal_id}`));
document.getElementById(`plano-titulo${modal_id}`).setAttribute('hidden', ""); document.getElementById(`plano-titulo${modal_id}`).setAttribute('hidden', "");
document.getElementById(`plano-nome${modal_id}`).setAttribute('hidden', ""); document.getElementById(`plano-nome${modal_id}`).setAttribute('hidden', "");
document.getElementById(`plano-anexo${modal_id}`).setAttribute('hidden', ""); document.getElementById(`plano-anexo${modal_id}`).setAttribute('hidden', "");
} }
$(`#exampleModal${modal_id}`).modal('show'); $(`#exampleModal${modal_id}`).modal('show');
} }
function exibirProfessorAdicionado(){ function exibirProfessorAdicionado() {
$('#modalIntegrante').modal('hide'); $('#modalIntegrante').modal('hide');
$(`#aviso-modal-usuario-adicionado`).modal('show'); $(`#aviso-modal-usuario-adicionado`).modal('show');
} }
......
...@@ -360,7 +360,7 @@ ...@@ -360,7 +360,7 @@
@endif @endif
<div style="display: block" @if(old('funcaoParticipante') == null || !array_key_exists($i, old('funcaoParticipante')) || old('funcaoParticipante')[$i] == 'Bolsista') @else hidden @endif> <div style="display: block" @if(old('funcaoParticipante') == null || !array_key_exists($i, old('funcaoParticipante')) || old('funcaoParticipante')[$i] == 'Bolsista') @else hidden @endif>
@if($edital->tipo != "CONTINUO")
<div class="col-md-12" id="plano-titulo{{$i}}"> <div class="col-md-12" id="plano-titulo{{$i}}">
<h5>Plano de trabalho</h5> <h5>Plano de trabalho</h5>
</div> </div>
...@@ -391,7 +391,7 @@ ...@@ -391,7 +391,7 @@
@enderror @enderror
@endcomponent @endcomponent
</div> </div>
@endif
</div> </div>
{{-- <div class="col-6"> {{-- <div class="col-6">
......
...@@ -69,6 +69,13 @@ ...@@ -69,6 +69,13 @@
</div> </div>
@endif @endif
@if($edital->tipo == 'PIBIC' && $edital->natureza_id == 2)
<div class="col-sm-4">
<label title="Decisão da Câmara ou Conselho Pertinente" for="anexo_acao_afirmativa" class="col-form-label font-tam" style="font-weight: bold">{{ __('Ação Afirmativa: ') }}</label>
<a href="{{ route('baixar.anexo.acao.afirmativa', ['id' => $projeto->id]) }}"><img class="" src="{{asset('img/icons/pdf.ico')}}" style="width:40px" alt=""></a>
</div>
@endif
@if($edital->nome_docExtra != null) @if($edital->nome_docExtra != null)
{{-- Documento Extra --}} {{-- Documento Extra --}}
<div class="col-sm-4"> <div class="col-sm-4">
......
...@@ -13,24 +13,25 @@ ...@@ -13,24 +13,25 @@
<hr style="border-top: 1px solid#1492E6"> <hr style="border-top: 1px solid#1492E6">
<div class="row justify-content-start" style="alignment: center"> <div class="row justify-content-start" style="alignment: center">
@foreach($trabalhos_user as $trabalho_user) @foreach($projeto->participantes as $participante)
<div class="col-sm-1 mt-4"> <div class="col-sm-1 mt-4">
<img src="{{asset('img/icons/usuario.svg')}}" style="width:60px" alt=""> <img src="{{asset('img/icons/usuario.svg')}}" style="width:60px" alt="">
</div> </div>
<div class="col-sm-5 mt-4"> <div class="col-sm-5 mt-4">
<h5 class="mb-0">Nome: {{ $trabalho_user->user->name }}</h5> <h5 class="mb-0">Nome: {{$participante->user->name}}</h5>
<h5 class="mb-0">Função: {{ $trabalho_user->funcao->nome }}</h5> <h5 class="mb-0">Plano: @if(isset($participante->planoTrabalho)) {{$participante->planoTrabalho->titulo}} @else Plano Em Substituição @endif </h5>
<h6> <h6>
<a href="" data-toggle="modal" data-target="#modalVizuIntegrante{{$trabalho_user->id}}" class="button">Informações</a> <a href="" data-toggle="modal" data-target="#modalVizuParticipante{{$participante->id}}" class="button">Informações</a>
</h6> </h6>
</div> </div>
<div class="modal fade" id="modalVizuIntegrante{{$trabalho_user->id}}" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"> <!-- Modal visualizar informações participante -->
<div class="modal fade" id="modalVizuParticipante{{$participante->id}}" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal-xl"> <div class="modal-dialog modal-dialog-centered modal-xl">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header" style="overflow-x:auto; padding-left: 31px"> <div class="modal-header" style="overflow-x:auto; padding-left: 31px">
<h5 class="modal-title" id="exampleModalLabel" style= "color:#1492E6">Informações Integrante</h5> <h5 class="modal-title" id="exampleModalLabel" style= "color:#1492E6">Informações Participante</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close" style="padding-top: 8px; color:#1492E6"> <button type="button" class="close" data-dismiss="modal" aria-label="Close" style="padding-top: 8px; color:#1492E6">
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
...@@ -38,22 +39,183 @@ ...@@ -38,22 +39,183 @@
</div> </div>
<div class="modal-body" style="padding-right: 32px;padding-left: 32px;padding-top: 20px;padding-bottom: 32px;"> <div class="modal-body" style="padding-right: 32px;padding-left: 32px;padding-top: 20px;padding-bottom: 32px;">
<div class="container-fluid">
<div class="col-sm-5 mt-4"> <div class="row">
<h5 class="mb-0">Nome: {{ $trabalho_user->user->name }}</h5> <div class="col-6">
<h5 class="mb-0">E-mail: {{ $trabalho_user->user->email }}</h5> @component('componentes.input', ['label' => 'Nome completo'])
<h5 class="mb-0">Instituição: {{ $trabalho_user->user->instituicao }}</h5> <input type="text" class="form-control " value="{{$participante->user->name}}" name="name" placeholder="Nome Completo" maxlength="150" id="nome{{$participante->id}}" disabled />
<h5 class="mb-0">Cargo no projeto: {{ $trabalho_user->funcao->nome }}</h5> @endcomponent
</div>
<div class="col-6">
@component('componentes.input', ['label' => 'E-mail'])
<input type="email" class="form-control" value="{{$participante->user->email}}" name="email" placeholder="E-mail" maxlength="150" id="email{{$participante->id}}" disabled />
@endcomponent
</div> </div>
</div> </div>
<div class="row">
<div class="col-6">
@component('componentes.input', ['label' => 'Data de nascimento'])
<input type="date" class="form-control" value="{{$participante->data_de_nascimento}}" name="data_de_nascimento" placeholder="Data de nascimento" disabled />
@endcomponent
</div>
<div class="col-6">
@component('componentes.input', ['label' => 'CPF'])
<input type="text" class="form-control cpf" value="{{$participante->user->cpf}}" name="cpf" placeholder="CPF" disabled />
@endcomponent
</div>
</div>
<div class="row">
<div class="col-6">
@component('componentes.input', ['label' => 'RG'])
<input type="text" class="form-control" min="1" maxlength="12" value="{{$participante->rg}}" name="rg" placeholder="RG" disabled />
@endcomponent
</div>
<div class="col-6">
@component('componentes.input', ['label' => 'Celular'])
<input type="tel" class="form-control celular" value="{{$participante->user->celular}}" name="celular" placeholder="Celular" id="inputCelular" disabled />
@endcomponent
</div>
</div>
<div class="row">
<div class="col-md-12">
<h5 style="font-weight: bold;">Endereço</h5>
</div>
</div>
<div class="row">
<div class="col-6">
@component('componentes.input', ['label' => 'CEP'])
<input type="text" class="form-control cep" value="@if(isset($participante->user->endereco)){{$participante->user->endereco->cep}} @endif" name="cep" placeholder="CEP" disabled />
@endcomponent
</div>
<div class="col-6">
@component('componentes.select', ['label' => 'Estado'])
<select name="uf" id="estado" class="form-control" style="visibility: visible" disabled>
<option value="@if(isset($participante->user->endereco)) {{$participante->user->endereco->uf}} @endif" selected>@if(isset($participante->user->endereco)) {{$participante->user->endereco->uf}} @endif</option>
</select>
@endcomponent
</div>
</div>
<div class="row">
<div class="col-6">
@component('componentes.input', ['label' => 'Cidade'])
<input type="text" class="form-control" value=" @if(isset($participante->user->endereco)){{$participante->user->endereco->cidade}} @endif" name="cidade" placeholder="Cidade" maxlength="50" id="cidade{{$participante->id}}" disabled />
@endcomponent
</div>
<div class="col-6">
@component('componentes.input', ['label' => 'Bairro'])
<input type="text" class="form-control" value="@if(isset($participante->user->endereco)){{$participante->user->endereco->bairro}} @endif" name="bairro" placeholder="Bairro" maxlength="50" id="bairro{{$participante->id}}" disabled />
@endcomponent
</div>
</div>
<div class="row">
<div class="col-6">
@component('componentes.input', ['label' => 'Rua'])
<input type="text" class="form-control" value="@if(isset($participante->user->endereco)) {{ $participante->user->endereco->rua}} @endif" name="rua" placeholder="Rua" maxlength="100" id="rua{{$participante->id}}" disabled />
@endcomponent
</div>
<div class="col-6">
@component('componentes.input', ['label' => 'Número'])
<input type="text" class="form-control" value="@if(isset($participante->user->endereco)){{$participante->user->endereco->numero}} @endif" name="numero" placeholder="Número" disabled />
@endcomponent
</div>
</div>
<div class="row">
<div class="col-12">
<div class="form-group">
<label class=" control-label" for="firstname">Complemento</label>
<input type="text" class="form-control" value="@if(isset($participante->user->endereco)){{ $participante->user->endereco->complemento}} @endif" name="complemento" placeholder="Complemento" maxlength="75" id="complemento{{$participante->id}}" disabled />
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<h5 style="font-weight: bold;">Dados do curso</h5>
</div>
</div>
<div class="row">
<div class="col-6">
@component('componentes.input', ['label' => 'Instituição de Ensino'])
<select style="display: inline" onchange="showInstituicao(this)" class="form-control" name="instituicao" id="instituicao[{{$participante->id}}]" disabled>
<option value="{{$participante->user->instituicao}}" disabled selected hidden>{{$participante->user->instituicao}}</option>
</select>
@endcomponent
</div>
<div class="col-6">
@component('componentes.input', ['label' => 'Curso'])
<select style="display: inline" class="form-control" name="curso" onchange="showCurso(this)" id="curso[{{$participante->id}}]" disabled>
<option value="{{$participante->curso}}" disabled selected hidden>{{$participante->curso}}</option>
</select>
@endcomponent
</div>
</div>
<div class="row">
<div class="col-6">
@component('componentes.select', ['label' => 'Turno'])
<select name="turno" class="form-control" disabled>
<option value="{{$participante->turno}}" selected>{{$participante->turno}}</option>
</select>
@endcomponent
</div>
<div class="col-6">
@component('componentes.select', ['label' => 'Total de períodos/anos do curso'])
<select name="total_periodos" class="form-control" onchange="gerarPeriodo(this)" disabled>
<option value="{{$participante->total_periodos}}" selected>{{$participante->total_periodos}}</option>
</select>
@endcomponent
</div>
</div>
<div class="row">
<div class="col-6">
@component('componentes.select', ['label' => 'Período/Ano atual'])
<select name="periodo_atual" class="form-control" disabled>
<option value="{{$participante->periodo_atual}}" selected>{{$participante->periodo_atual}}</option>
</select>
@endcomponent
</div>
<div class="col-6">
@component('componentes.select', ['label' => 'Ordem de prioridade'])
<select name="ordem_prioridade" class="form-control" disabled>
<option value="{{$participante->ordem_prioridade}}" selected>{{$participante->ordem_prioridade}}</option>
</select>
@endcomponent
</div>
</div>
<div class="row">
<div class="col-md-12">
<h5 style="font-weight: bold;">Plano de trabalho</h5>
</div>
</div>
<div class="row justify-content-center">
@if($participante->planoTrabalho)
<div class="col-6">
<h6>{{$participante->planoTrabalho->titulo}}</h6>
</div>
<div class="col-6">
<a href="{{ route('baixar.plano', ['id' => $participante->planoTrabalho->id]) }}"><i class="fas fa-file-pdf fa-2x"></i></a>
</div>
@else
<div class="col-3 text-danger">
<p><i class="fas fa-times-circle fa-2x"></i></p>
</div>
@endif
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
@endforeach @endforeach
</div> </div>
</div> </div>
......
...@@ -42,7 +42,6 @@ ...@@ -42,7 +42,6 @@
</div> </div>
<div class="modal-body" style="padding-right: 32px;padding-left: 32px;padding-top: 20px;padding-bottom: 32px;"> <div class="modal-body" style="padding-right: 32px;padding-left: 32px;padding-top: 20px;padding-bottom: 32px;">
@include('administrador.substituirParticipanteForm', ['visualizarOnly' => 1,'trabalho' => $projeto])
</div> </div>
</div> </div>
</div> </div>
......
...@@ -2,743 +2,938 @@ ...@@ -2,743 +2,938 @@
@section('content') @section('content')
<div class="container" style="margin-top: 3rem"> <div class="container" style="margin-top: 3rem">
<div class="row" > <div class="row">
@if(session('mensagem')) @if(session('mensagem'))
<div class="col-md-12" style="margin-top: 30px;"> <div class="col-md-12" style="margin-top: 30px;">
<div class="alert alert-success"> <div class="alert alert-success">
<p>{{session('mensagem')}}</p> <p>{{session('mensagem')}}</p>
</div>
</div>
@endif
</div>
<form id="formEditUser" method="POST" action="{{ route('perfil.edit') }}">
@csrf
<div class="row justify-content-center">
<div class="col-md-8" style="margin-bottom:20px">
<div class="card shadow bg-white" style="border-radius:12px; border-width:0px;">
<div class="card-header" style="border-top-left-radius: 12px; border-top-right-radius: 12px; background-color: #fff">
<div class="d-flex justify-content-between align-items-center" style="margin-top: 9px; margin-bottom:6px">
<h5 class="card-title mb-0" style="font-size:25px; font-family:Arial, Helvetica, sans-serif; color:#1492E6">Cadastro</h5>
<h6 class="card-title mb-0" style="color:red">* Campos obrigatórios</h6>
</div>
</div> </div>
<div class="card-body"> </div>
<div class="form-row"> @endif
<div class="col-12"> </div>
@if ($errors->any()) <form id="formEditUser" method="POST" action="{{ route('perfil.edit') }}">
<div class="alert alert-danger"> @csrf
<ul> <div class="row justify-content-center">
@foreach ($errors->all() as $error) <div class="col-md-8" style="margin-bottom:20px">
<li>{{ $error }}</li> <div class="card shadow bg-white" style="border-radius:12px; border-width:0px;">
@endforeach <div class="card-header"
</ul> style="border-top-left-radius: 12px; border-top-right-radius: 12px; background-color: #fff">
</div> <div class="d-flex justify-content-between align-items-center"
@endif style="margin-top: 9px; margin-bottom:6px">
<h5 class="card-title mb-0"
style="font-size:25px; font-family:Arial, Helvetica, sans-serif; color:#1492E6">
Cadastro</h5>
<h6 class="card-title mb-0" style="color:red">* Campos obrigatórios</h6>
</div> </div>
<div class="col-md-12"> </div>
<div class="d-flex justify-content-between align-items-center" style="margin-bottom:6px"> <div class="card-body">
<h5 class="card-title mb-0" style="font-size:20px; font-family:Arial, Helvetica, sans-serif; font-family:Arial, Helvetica, sans-serif; ">Informações pessoais</h5> <div class="form-row">
<div class="col-12">
@if ($errors->any())
<div class="alert alert-danger">
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
@endif
</div>
<div class="col-md-12">
<div class="d-flex justify-content-between align-items-center"
style="margin-bottom:6px">
<h5 class="card-title mb-0"
style="font-size:20px; font-family:Arial, Helvetica, sans-serif; font-family:Arial, Helvetica, sans-serif; ">
Informações pessoais</h5>
</div>
</div> </div>
</div> <div class="col-md-12">
<div class="col-md-12"> <div class="form-group">
<div class="form-group"> <label for="name" class="col-form-label"
<label for="name" class="col-form-label" style="font-weight:600;">{{ __('Nome Completo') }}<span style="color: red; font-weight:bold;">*</span></label> style="font-weight:600;">{{ __('Nome Completo') }}<span
<input id="name" type="text" class="form-control @error('name') is-invalid @enderror" name="name" placeholder="Digite seu nome completo" value="{{ old('name', $user->name) }}" required autocomplete="name" autofocus> style="color: red; font-weight:bold;">*</span></label>
@error('name') <input id="name" type="text"
<span class="invalid-feedback" role="alert"> class="form-control @error('name') is-invalid @enderror" name="name"
placeholder="Digite seu nome completo"
value="{{ old('name', $user->name) }}" required autocomplete="name"
autofocus>
@error('name')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div>
</div> </div>
</div> <div class="col-md-6">
<div class="col-md-6"> <div class="form-group">
<div class="form-group"> <label for="cpf" class="col-form-label" style="font-weight:600;">{{ __('CPF') }}
<label for="cpf" class="col-form-label" style="font-weight:600;">{{ __('CPF') }}<span style="color: red; font-weight:bold;">*</span></label> <span style="color: red; font-weight:bold;">*</span></label>
<input id="cpf" type="text" class="form-control @error('cpf') is-invalid @enderror" name="cpf" placeholder="Digite o número do CPF" value="{{ old('cpf', $user->cpf) }}" required autocomplete="cpf" autofocus> <input id="cpf" type="text"
class="form-control @error('cpf') is-invalid @enderror" name="cpf"
@error('cpf') placeholder="Digite o número do CPF" value="{{ old('cpf', $user->cpf) }}"
<span class="invalid-feedback" role="alert"> required autocomplete="cpf" autofocus>
@error('cpf')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div>
</div> </div>
</div> <div class="col-md-6">
<div class="col-md-6"> <div class="form-group">
<div class="form-group"> <label for="rg" class="col-form-label" style="font-weight:600;">{{ __('RG') }}
<label for="rg" class="col-form-label" style="font-weight:600;">{{ __('RG') }}<span style="color: red; font-weight:bold;">*</span></label> <span style="color: red; font-weight:bold;">*</span></label>
<input id="rg" type="text" class="form-control @error('rg') is-invalid @enderror" name="rg" placeholder="Digite o número do RG" @if($user->participantes()->exists()) value="{{ old('rg', $user->participantes()->first()->rg) }}" @else value="{{ old('rg') }}" @endif required autocomplete="rg" autofocus> <input id="rg" type="text"
class="form-control @error('rg') is-invalid @enderror" name="rg"
@error('rg') placeholder="Digite o número do RG"
<span class="invalid-feedback" role="alert"> @if($user->participantes()->exists()) value="{{ old('rg', $user->participantes()->first()->rg) }}"
@else value="{{ old('rg') }}" @endif required autocomplete="rg"
autofocus>
@error('rg')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div>
</div> </div>
</div> <div class="col-md-6">
<div class="col-md-6"> <div class="form-group">
<div class="form-group"> <label for="celular" class="col-form-label"
<label for="celular" class="col-form-label" style="font-weight:600;">{{ __('Celular') }}<span style="color: red; font-weight:bold;">*</span></label> style="font-weight:600;">{{ __('Celular') }}<span
<input id="celular" type="text" class="form-control @error('celular') is-invalid @enderror" name="celular" placeholder="Digite o número do seu celular" value="{{ old('celular', $user->celular) }}" required autocomplete="celular" autofocus> style="color: red; font-weight:bold;">*</span></label>
<input id="celular" type="text"
@error('celular') class="form-control @error('celular') is-invalid @enderror"
<span class="invalid-feedback" role="alert"> name="celular" placeholder="Digite o número do seu celular"
value="{{ old('celular', $user->celular) }}" required
autocomplete="celular" autofocus>
@error('celular')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div>
</div> </div>
</div> <div class="col-md-12">
<div class="col-md-12"> <div class="d-flex justify-content-between align-items-center"
<div class="d-flex justify-content-between align-items-center" style="margin-bottom:6px"> style="margin-bottom:6px">
<h5 class="card-title mb-0" style="font-size:20px; font-family:Arial, Helvetica, sans-serif; font-family:Arial, Helvetica, sans-serif; ">Instituição</h5> <h5 class="card-title mb-0"
style="font-size:20px; font-family:Arial, Helvetica, sans-serif; font-family:Arial, Helvetica, sans-serif; ">
Instituição</h5>
</div>
</div> </div>
</div> <div class="col-md-12">
<div class="col-md-12"> <div class="form-group">
<div class="form-group"> <label for="instituicaoSelect" class="col-form-label"
<label for="instituicaoSelect" class="col-form-label" style="font-weight:600;">{{ __('Instituição de Vínculo') }}<span style="color: red; font-weight:bold;">*</span></label> style="font-weight:600;">{{ __('Instituição de Vínculo') }}<span
<select style="display: inline" onchange="showInstituicao()" class="form-control @error('instituicaoSelect') is-invalid @enderror" name="instituicaoSelect" id="instituicaoSelect"> style="color: red; font-weight:bold;">*</span></label>
<option value="" disabled selected hidden>-- Instituição --</option> <select style="display: inline" onchange="showInstituicao()"
<option @if(old('instituicaoSelect', $user->instituicao)=='UFAPE' ) selected @endif value="UFAPE">Universidade Federal do Agreste de Pernambuco - UFAPE</option> class="form-control @error('instituicaoSelect') is-invalid @enderror"
<option @if(old('instituicaoSelect', $user->instituicao)=='Outra' ) selected @endif value="Outra">Outra</option> name="instituicaoSelect" id="instituicaoSelect">
</select> <option value="" disabled selected hidden>-- Instituição --</option>
@error('instituicaoSelect') <option @if(old('instituicaoSelect', $user->instituicao)=='UFAPE' ) selected
<span class="invalid-feedback" role="alert"> @endif value="UFAPE">Universidade Federal do Agreste de Pernambuco -
UFAPE
</option>
<option @if(old('instituicaoSelect', $user->instituicao)=='Outra' ) selected
@endif value="Outra">Outra
</option>
</select>
@error('instituicaoSelect')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div>
</div> </div>
</div> <div class="col-md-12" id="displayOutro" style='display:none'>
<div class="col-md-12" id="displayOutro" style='display:none'> <div class="form-group">
<div class="form-group"> <label for="instituicao" class="col-form-label"
<label for="instituicao" class="col-form-label" style="font-weight:600;">{{ __('Digite a Instituição') }}<span style="color: red; font-weight:bold;">*</span></label> style="font-weight:600;">{{ __('Digite a Instituição') }}<span
<input id="instituicao" type="text" class="form-control @error('instituicao') is-invalid @enderror" name="instituicao" value="{{ old('instituicao') }}" placeholder="Digite o nome da Instituição" autofocus> style="color: red; font-weight:bold;">*</span></label>
@error('instituicao') <input id="instituicao" type="text"
<span class="invalid-feedback" role="alert"> class="form-control @error('instituicao') is-invalid @enderror"
name="instituicao" value="{{ old('instituicao') }}"
placeholder="Digite o nome da Instituição" autofocus>
@error('instituicao')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div>
</div> </div>
</div> <div class="col-md-6">
<div class="col-md-6"> <div class="form-group">
<div class="form-group"> <label for="perfil" class="col-form-label"
<label for="perfil" class="col-form-label" style="font-weight:600;">{{ __('Perfil') }}<span style="color: red; font-weight:bold;">*</span></label> style="font-weight:600;">{{ __('Perfil') }}<span
<input type="hidden" name="perfil" value="{{$user->tipo}}"> style="color: red; font-weight:bold;">*</span></label>
<select disabled id="perfil" class="form-control @error('perfil') is-invalid @enderror"> <input type="hidden" name="perfil" value="{{$user->tipo}}">
<option value="" disabled selected hidden>-- Perfil --</option> <select disabled id="perfil"
<option @if(old('perfil')=='Professor' ) selected @endif value="Professor">Professor</option> class="form-control @error('perfil') is-invalid @enderror">
<option @if(old('perfil')=='Técnico' ) selected @endif value="Técnico">Técnico</option> <option value="" disabled selected hidden>-- Perfil --</option>
<option @if(old('perfil')=='Estudante' || $user->tipo == 'participante') selected @endif value="Estudante">Estudante</option> <option @if(old('perfil')=='Professor' ) selected @endif value="Professor">
<option @if(old('perfil')=='Outro' ) selected @endif value="Outro">Outro</option> Professor
</select> </option>
@error('perfil') <option @if(old('perfil')=='Técnico' ) selected @endif value="Técnico">
<span class="invalid-feedback" role="alert"> Técnico
</option>
<option @if(old('perfil')=='Estudante' || $user->tipo == 'participante') selected
@endif value="Estudante">Estudante
</option>
<option @if(old('perfil')=='Outro' ) selected @endif value="Outro">Outro
</option>
</select>
@error('perfil')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div>
</div> </div>
</div> <div class="col-md-6">
<div class="col-md-6"> <div class="form-group" id="outroPerfil">
<div class="form-group" id="outroPerfil"> <label for="outroPerfil" class="col-form-label"
<label for="outroPerfil" class="col-form-label" style="font-weight:600;">{{ __('Qual perfil?') }}<span style="color: red; font-weight:bold;">*</span></label> style="font-weight:600;">{{ __('Qual perfil?') }}<span
<input id="outroPerfil" type="text" class="form-control @error('outroPerfil') is-invalid @enderror" name="outroPerfil" placeholder="Digite aqui qual o seu perfil" value="{{ old('outroPerfil') }}"> style="color: red; font-weight:bold;">*</span></label>
@error('outroPerfil') <input id="outroPerfil" type="text"
<span class="invalid-feedback" role="alert"> class="form-control @error('outroPerfil') is-invalid @enderror"
name="outroPerfil" placeholder="Digite aqui qual o seu perfil"
value="{{ old('outroPerfil') }}">
@error('outroPerfil')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div>
</div> </div>
</div> <div style="display:none" id="divCursos" class="col-md-12 mb-2">
<div style="display:none" id="divCursos" class="col-md-12 mb-2"> <label for="curso" class="col-form-label"
<label for="curso" class="col-form-label" style="font-weight:600;">{{ __('Cursos que Leciona') }}<span style="color: red; font-weight:bold;">*</span></label> style="font-weight:600;">{{ __('Cursos que Leciona') }}<span
<br> style="color: red; font-weight:bold;">*</span></label>
<div class="row col-md-12"> <br>
@foreach($cursos as $curso) <div class="row col-md-12">
<div class="col-sm-6"> @foreach($cursos as $curso)
<input type="checkbox" name="curso[]" id="curso{{$curso->id}}" value="{{$curso->id}}"> @if($curso->nome == "Outro Curso")
<label class="form-check-label" for="curso{{$curso->id}}"> <div id="divOutroCurso" class="col-sm-6" style="display: none">
{{ $curso->nome }} <input type="checkbox" name="curso[]"
</label> id="curso{{$curso->id}}"
</div> value="{{$curso->id}}">
@endforeach <label class="form-check-label" for="curso{{$curso->id}}">
{{ $curso->nome }}
</label>
</div>
@else
<div class="col-sm-6">
<input type="checkbox" name="curso[]"
id="curso{{$curso->id}}"
value="{{$curso->id}}">
<label class="form-check-label" for="curso{{$curso->id}}">
{{ $curso->nome }}
</label>
</div>
@endif
@endforeach
</div>
</div> </div>
</div>
<!-- Proponente --> <!-- Proponente -->
<div class="col-md-6"> <div class="col-md-6">
<div class="form-group" id="divVinculo"> <div class="form-group" id="divVinculo">
<label for="vinculo" class="col-form-label" style="font-weight:600;">{{ __('Vínculo') }}<span style="color: red; font-weight:bold;">*</span></label> <label for="vinculo" class="col-form-label"
<select name="vinculo" id="vinculo" class="form-control @error('vinculo') is-invalid @enderror" onchange="mudarPerfil()"> style="font-weight:600;">{{ __('Vínculo') }}<span
<option value="" disabled selected hidden>-- Vínculo --</option> style="color: red; font-weight:bold;">*</span></label>
<option @if(old('vinculo')=='Servidor na ativa' ) selected @endif value="Servidor na ativa">Servidor na ativa</option> <select name="vinculo" id="vinculo"
<option @if(old('vinculo')=='Servidor aposentado' ) selected @endif value="Servidor aposentado">Servidor aposentado</option> class="form-control @error('vinculo') is-invalid @enderror"
<option @if(old('vinculo')=='Professor visitante' ) selected @endif value="Professor visitante">Professor visitante</option> onchange="mudarPerfil()">
<option @if(old('vinculo')=='Pós-doutorando' ) selected @endif value="Pós-doutorando">Pós-doutorando</option> <option value="" disabled selected hidden>-- Vínculo --</option>
<option @if(old('vinculo')=='Outro' ) selected @endif value="Outro">Outro</option> <option @if(old('vinculo')=='Servidor na ativa' ) selected
</select> @endif value="Servidor na ativa">Servidor na ativa
</option>
@error('vinculo') <option @if(old('vinculo')=='Servidor aposentado' ) selected
<span class="invalid-feedback" role="alert"> @endif value="Servidor aposentado">Servidor aposentado
</option>
<option @if(old('vinculo')=='Professor visitante' ) selected
@endif value="Professor visitante">Professor visitante
</option>
<option @if(old('vinculo')=='Pós-doutorando' ) selected
@endif value="Pós-doutorando">Pós-doutorando
</option>
<option @if(old('vinculo')=='Outro' ) selected @endif value="Outro">Outro
</option>
</select>
@error('vinculo')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div>
</div> </div>
</div> <div class="col-md-6">
<div class="col-md-6"> <div class="form-group" id="divOutro">
<div class="form-group" id="divOutro"> <label for="outro" class="col-form-label"
<label for="outro" class="col-form-label" style="font-weight:600;">{{ __('Qual?') }}<span style="color: red; font-weight:bold;">*</span></label> style="font-weight:600;">{{ __('Qual?') }}<span
<input id="outro" type="text" class="form-control @error('outro') is-invalid @enderror" name="outro" placeholder="Digite aqui o seu vínculo" value="{{ old('outro') }}"> style="color: red; font-weight:bold;">*</span></label>
@error('outro') <input id="outro" type="text"
<span class="invalid-feedback" role="alert"> class="form-control @error('outro') is-invalid @enderror" name="outro"
placeholder="Digite aqui o seu vínculo" value="{{ old('outro') }}">
@error('outro')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div> </div>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<div class="form-group" id="divTitulacaoMax" style="display: none"> <div class="form-group" id="divTitulacaoMax" style="display: none">
<label for="titulacaoMaxima" class="col-form-label" style="font-weight:600;">{{ __('Titulação Máxima') }}<span style="color: red; font-weight:bold;">*</span></label> <label for="titulacaoMaxima" class="col-form-label"
<select id="titulacaoMaxima" class="form-control @error('titulacaoMaxima') is-invalid @enderror" name="titulacaoMaxima" value="{{ old('titulacaoMaxima') }}" autocomplete="nome"> style="font-weight:600;">{{ __('Titulação Máxima') }}<span
<option value="" disabled selected hidden>-- Titulação --</option> style="color: red; font-weight:bold;">*</span></label>
<option @if(old('titulacaoMaxima')=='Doutorado' ) selected @endif value="Doutorado">Doutorado</option>perfil <select id="titulacaoMaxima"
<option @if(old('titulacaoMaxima')=='Mestrado' ) selected @endif value="Mestrado">Mestrado</option> class="form-control @error('titulacaoMaxima') is-invalid @enderror"
<option @if(old('titulacaoMaxima')=='Especialização' ) selected @endif value="Especialização">Especialização</option> name="titulacaoMaxima" value="{{ old('titulacaoMaxima') }}"
<option @if(old('titulacaoMaxima')=='Graduação' ) selected @endif value="Graduação">Graduação</option> autocomplete="nome">
<option @if(old('titulacaoMaxima')=='Técnico' ) selected @endif value="Técnico">Técnico</option> <option value="" disabled selected hidden>-- Titulação --</option>
</select> <option @if(old('titulacaoMaxima')=='Doutorado' ) selected
@endif value="Doutorado">Doutorado
@error('titulacaoMaxima') </option>
<span class="invalid-feedback" role="alert"> perfil
<option @if(old('titulacaoMaxima')=='Mestrado' ) selected
@endif value="Mestrado">Mestrado
</option>
<option @if(old('titulacaoMaxima')=='Especialização' ) selected
@endif value="Especialização">Especialização
</option>
<option @if(old('titulacaoMaxima')=='Graduação' ) selected
@endif value="Graduação">Graduação
</option>
<option @if(old('titulacaoMaxima')=='Técnico' ) selected
@endif value="Técnico">Técnico
</option>
</select>
@error('titulacaoMaxima')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div>
</div> </div>
</div> <div class="col-md-6">
<div class="col-md-6"> <div class="form-group" id="anoTitulacao" style="display: none">
<div class="form-group" id="anoTitulacao" style="display: none"> <label for="AnoTitulacao" class="col-form-label"
<label for="AnoTitulacao" class="col-form-label" style="font-weight:600;">{{ __('Ano da Titulação Máxima') }}<span style="color: red; font-weight:bold;">*</span></label> style="font-weight:600;">{{ __('Ano da Titulação Máxima') }}<span
<input id="AnoTitulacao" type="text" class="form-control @error('anoTitulacao') is-invalid @enderror" name="anoTitulacao" placeholder="Digite o ano de titulação" value="{{ old('anoTitulacao') }}" autocomplete="nome"> style="color: red; font-weight:bold;">*</span></label>
<input id="AnoTitulacao" type="text"
@error('anoTitulacao') class="form-control @error('anoTitulacao') is-invalid @enderror"
<span class="invalid-feedback" role="alert"> name="anoTitulacao" placeholder="Digite o ano de titulação"
value="{{ old('anoTitulacao') }}" autocomplete="nome">
@error('anoTitulacao')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div>
</div> </div>
</div> <div class="col-md-6">
<div class="col-md-6" > <div class="form-group" id="areaFormacao" style="display: none">
<div class="form-group" id="areaFormacao" style="display: none"> <label for="areaFormacao" class="col-form-label"
<label for="areaFormacao" class="col-form-label" style="font-weight:600;">{{ __('Área de Formação') }}<span style="color: red; font-weight:bold;">*</span></label> style="font-weight:600;">{{ __('Área de Formação') }}<span
<input id="areaFormacao" type="text" class="form-control @error('areaFormacao') is-invalid @enderror" name="areaFormacao" placeholder="Digite a sua área de formação" value="{{ old('areaFormacao') }}" autocomplete="nome"> style="color: red; font-weight:bold;">*</span></label>
<input id="areaFormacao" type="text"
@error('areaFormacao') class="form-control @error('areaFormacao') is-invalid @enderror"
<span class="invalid-feedback" role="alert"> name="areaFormacao" placeholder="Digite a sua área de formação"
value="{{ old('areaFormacao') }}" autocomplete="nome">
@error('areaFormacao')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div>
</div> </div>
</div> <div class="col-md-6">
<div class="col-md-6"> <div class="form-group" id="siape" style="display: none">
<div class="form-group" id="siape" style="display: none"> <label for="SIAPE" class="col-form-label"
<label for="SIAPE" class="col-form-label" style="font-weight:600;">{{ __('SIAPE') }}</label> style="font-weight:600;">{{ __('SIAPE') }}</label>
<input id="SIAPE" type="text" class="form-control @error('SIAPE') is-invalid @enderror" name="SIAPE" placeholder="Digite o SIAPE" value="{{ old('SIAPE') }}" autocomplete="nome"> <input id="SIAPE" type="text"
class="form-control @error('SIAPE') is-invalid @enderror" name="SIAPE"
@error('SIAPE') placeholder="Digite o SIAPE" value="{{ old('SIAPE') }}"
<span class="invalid-feedback" role="alert"> autocomplete="nome">
@error('SIAPE')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div>
</div> </div>
</div> <div class="col-md-6">
<div class="col-md-6"> <div class="form-group" id="bolsista" style="display: none">
<div class="form-group" id="bolsista" style="display: none"> <label for="bolsistaProdutividade" class="col-form-label"
<label for="bolsistaProdutividade" class="col-form-label" style="font-weight:600;">{{ __('Bolsista de Produtividade') }}<span style="color: red; font-weight:bold;">*</span></label><br> style="font-weight:600;">{{ __('Bolsista de Produtividade') }}<span
<select name="bolsistaProdutividade" id="bolsistaProdutividade" class="form-control @error('bolsistaProdutividade') is-invalid @enderror" onchange="mudarNivel()"> style="color: red; font-weight:bold;">*</span></label><br>
<option value="" disabled selected hidden>-- Bolsista --</option> <select name="bolsistaProdutividade" id="bolsistaProdutividade"
<option @if(old('bolsistaProdutividade')=='nao' ) selected @endif value="nao">Não</option> class="form-control @error('bolsistaProdutividade') is-invalid @enderror"
<option @if(old('bolsistaProdutividade')=='sim' ) selected @endif value="sim">Sim</option> onchange="mudarNivel()">
</select> <option value="" disabled selected hidden>-- Bolsista --</option>
@error('bolsistaProdutividade') <option @if(old('bolsistaProdutividade')=='nao' ) selected
<span class="invalid-feedback" role="alert"> @endif value="nao">Não
</option>
<option @if(old('bolsistaProdutividade')=='sim' ) selected
@endif value="sim">Sim
</option>
</select>
@error('bolsistaProdutividade')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div>
</div> </div>
</div> <div class="col-md-6">
<div class="col-md-6"> <div class="form-group" id="nivelInput" style="display: block;">
<div class="form-group" id="nivelInput" style="display: block;"> <label for="nivel" class="col-form-label"
<label for="nivel" class="col-form-label" style="font-weight:600;">{{ __('Nível') }}<span style="color: red; font-weight:bold;">*</span></label> style="font-weight:600;">{{ __('Nível') }}<span
<select name="nivel" id="nivel" class="form-control @error('nivel') is-invalid @enderror"> style="color: red; font-weight:bold;">*</span></label>
<option value="" disabled selected hidden></option> <select name="nivel" id="nivel"
<option value="1A">1A</option> class="form-control @error('nivel') is-invalid @enderror">
<option value="1B">1B</option> <option value="" disabled selected hidden></option>
<option value="1C">1C</option> <option value="1A">1A</option>
<option value="1D">1D</option> <option value="1B">1B</option>
<option value="2">2</option> <option value="1C">1C</option>
</select> <option value="1D">1D</option>
@error('nivel') <option value="2">2</option>
<span class="invalid-feedback" role="alert"> </select>
@error('nivel')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div>
</div> </div>
</div>
<!-- Estudante --> <!-- Estudante -->
<div class="col-md-6"> <div class="col-md-6">
<div class="form-group" id="dataNascimento"> <div class="form-group" id="dataNascimento">
@component('componentes.input', ['label' => 'Data de nascimento']) @component('componentes.input', ['label' => 'Data de nascimento'])
<input type="date" class="form-control" @if($user->participantes()->exists()) value="{{old('data_de_nascimento', $user->participantes()->first()->data_de_nascimento)}}" @else value="{{old('data_de_nascimento')}}" @endif name="data_de_nascimento" placeholder="Data de nascimento" /> <input type="date" class="form-control"
@error('data_de_nascimento') @if($user->participantes()->exists()) value="{{old('data_de_nascimento', $user->participantes()->first()->data_de_nascimento)}}"
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block"> @else value="{{old('data_de_nascimento')}}"
@endif name="data_de_nascimento" placeholder="Data de nascimento"/>
@error('data_de_nascimento')
<span class="invalid-feedback" role="alert"
style="overflow: visible; display:block">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
@endcomponent @endcomponent
</div> </div>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<div class="form-group" id="curso"> <div class="form-group" id="curso">
@component('componentes.input', ['label' => 'Curso']) @component('componentes.input', ['label' => 'Curso'])
<select style="display: inline" class="form-control" id='cursoEstudante' name="cursoEstudante" onchange="outroCurso(this)"> <select style="display: inline" class="form-control" id='cursoEstudante'
<option value="" disabled selected hidden>-- Selecione uma opção--</option> name="cursoEstudante" onchange="outroCurso(this)">
@foreach ($cursos as $curso) <option value="" disabled selected hidden>-- Selecione uma opção--
<option @isset($cursoPart) @if(old('cursoEstudante', $cursoPart->id) == $curso->id) selected @endif @else @if(old('cursoEstudante') == $curso->id) selected @endif @endisset value='{{$curso->id}}'>{{$curso->nome}}</option> </option>
@endforeach @foreach ($cursos as $curso)
<option @if(old('cursoEstudante') == "Outro" ) selected @endif value="Outro">Outro</option> @if($curso->nome != 'Outro Curso')
</select> <option @isset($cursoPart) @if(old('cursoEstudante', $cursoPart->id) == $curso->id) selected
@error('curso') @endif @else @if(old('cursoEstudante') == $curso->id) selected
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block"> @endif @endisset value='{{$curso->id}}'>{{$curso->nome}}</option>
@endif
@endforeach
<option @if(old('cursoEstudante') == "Outro" ) selected
@endif value="Outro">Outro
</option>
</select>
@error('curso')
<span class="invalid-feedback" role="alert"
style="overflow: visible; display:block">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
@endcomponent @endcomponent
</div> </div>
</div>
<div class="col-md-12">
<div class="form-group" id="divCursoEstudante" style="display:none">
@component('componentes.input', ['label' => 'Qual curso?'])
<input name="outroCursoEstudante" type="text" id="outroCursoEstudante" value="{{ old('outroCursoEstudante')}}" class="form-control"/>
@error('outroCursoEstudante')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block"><strong>{{ $message }}</strong></span>
@enderror
@endcomponent
</div> </div>
</div>
<div class="col-md-12" id='endereco'> <div class="col-md-12">
<div class="d-flex justify-content-between align-items-center" style="margin-bottom:6px"> <div class="form-group" id="divCursoEstudante" style="display:none">
<h5 class="card-title mb-0" style="font-size:20px; font-family:Arial, Helvetica, sans-serif; font-family:Arial, Helvetica, sans-serif; ">Endereço</h5> @component('componentes.input', ['label' => 'Qual curso?'])
<input name="outroCursoEstudante" type="text" id="outroCursoEstudante"
value="{{ old('outroCursoEstudante')}}" class="form-control"/>
@error('outroCursoEstudante')
<span class="invalid-feedback" role="alert"
style="overflow: visible; display:block"><strong>{{ $message }}</strong></span>
@enderror
@endcomponent
</div>
</div> </div>
</div>
<div class="col-md-6">
<div class="form-group" id="divCep"> <div class="col-md-12" id='endereco'>
@component('componentes.input', ['label' => 'CEP']) <div class="d-flex justify-content-between align-items-center"
<input name="cep" type="text" id="cep" value="{{ old('cep', $user->endereco->cep)}}" class="form-control cep" onblur="pesquisaCep(this.value)" /> style="margin-bottom:6px">
@error('cep') <h5 class="card-title mb-0"
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block"><strong>{{ $message }}</strong></span> style="font-size:20px; font-family:Arial, Helvetica, sans-serif; font-family:Arial, Helvetica, sans-serif; ">
@enderror Endereço</h5>
@endcomponent </div>
</div> </div>
</div> <div class="col-md-6">
<div class="col-md-6"> <div class="form-group" id="divCep">
<div class="form-group" id="divUf"> @component('componentes.input', ['label' => 'CEP'])
@component('componentes.input', ['label' => 'Estado']) <input name="cep" type="text" id="cep"
<input name="uf" type="text" class="form-control" value="{{ old('uf', $user->endereco->uf)}}" id="uf" /> value="{{ old('cep', $user->endereco->cep)}}"
@error('uf') class="form-control cep" onblur="pesquisaCep(this.value)"/>
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block"><strong>{{ $message }}</strong></span> @error('cep')
@enderror <span class="invalid-feedback" role="alert"
@endcomponent style="overflow: visible; display:block"><strong>{{ $message }}</strong></span>
@enderror
@endcomponent
</div>
</div> </div>
</div> <div class="col-md-6">
<div class="col-md-6"> <div class="form-group" id="divUf">
<div class="form-group" id="divCidade"> @component('componentes.input', ['label' => 'Estado'])
@component('componentes.input', ['label' => 'Cidade']) <input name="uf" type="text" class="form-control"
<input name="cidade" type="text" id="cidade" class="form-control" value="{{ old('cidade', $user->endereco->cidade)}}" /> value="{{ old('uf', $user->endereco->uf)}}" id="uf"/>
@error('cidade') @error('uf')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block"><strong>{{ $message }}</strong></span> <span class="invalid-feedback" role="alert"
@enderror style="overflow: visible; display:block"><strong>{{ $message }}</strong></span>
@endcomponent @enderror
</div> @endcomponent
</div> </div>
<div class="col-md-6">
<div class="form-group" id="divBairro">
@component('componentes.input', ['label' => 'Bairro'])
<input name="bairro" type="text" id="bairro" class="form-control" value="{{ old('bairro', $user->endereco->bairro)}}" />
@error('bairro')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block"><strong>{{ $message }}</strong></span>
@enderror
@endcomponent
</div>
</div>
<div class="col-md-6">
<div class="form-group" id='divRua'>
@component('componentes.input', ['label' => 'Rua'])
<input name="rua" type="text" id="rua" class="form-control" value="{{ old('rua', $user->endereco->rua)}}" />
@error('rua')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block"><strong>{{ $message }}</strong></span>
@enderror
@endcomponent
</div>
</div>
<div class="col-md-6">
<div class="form-group" id='numero'>
@component('componentes.input', ['label' => 'Número'])
<input name="numero" type="text" class="form-control" value="{{ old('numero', $user->endereco->numero)}}" />
@error('numero')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block"><strong>{{ $message }}</strong></span>
@enderror
@endcomponent
</div> </div>
</div> <div class="col-md-6">
<div class='col-md-12'> <div class="form-group" id="divCidade">
<div class="form-group" id='complemento'> @component('componentes.input', ['label' => 'Cidade'])
<label class=" control-label" for="firstname" style="font-weight:600;">Complemento</label> <input name="cidade" type="text" id="cidade" class="form-control"
<input type="text" class="form-control" value="{{old('complemento', $user->endereco->complemento)}}" name="complemento" placeholder="Complemento" maxlength="75" id="complemento" /> value="{{ old('cidade', $user->endereco->cidade)}}"/>
<span style="color: red; font-size: 12px" id="caracsRestantescomplemento"> @error('cidade')
<span class="invalid-feedback" role="alert"
style="overflow: visible; display:block"><strong>{{ $message }}</strong></span>
@enderror
@endcomponent
</div>
</div>
<div class="col-md-6">
<div class="form-group" id="divBairro">
@component('componentes.input', ['label' => 'Bairro'])
<input name="bairro" type="text" id="bairro" class="form-control"
value="{{ old('bairro', $user->endereco->bairro)}}"/>
@error('bairro')
<span class="invalid-feedback" role="alert"
style="overflow: visible; display:block"><strong>{{ $message }}</strong></span>
@enderror
@endcomponent
</div>
</div>
<div class="col-md-6">
<div class="form-group" id='divRua'>
@component('componentes.input', ['label' => 'Rua'])
<input name="rua" type="text" id="rua" class="form-control"
value="{{ old('rua', $user->endereco->rua)}}"/>
@error('rua')
<span class="invalid-feedback" role="alert"
style="overflow: visible; display:block"><strong>{{ $message }}</strong></span>
@enderror
@endcomponent
</div>
</div>
<div class="col-md-6">
<div class="form-group" id='numero'>
@component('componentes.input', ['label' => 'Número'])
<input name="numero" type="text" class="form-control"
value="{{ old('numero', $user->endereco->numero)}}"/>
@error('numero')
<span class="invalid-feedback" role="alert"
style="overflow: visible; display:block"><strong>{{ $message }}</strong></span>
@enderror
@endcomponent
</div>
</div>
<div class='col-md-12'>
<div class="form-group" id='complemento'>
<label class=" control-label" for="firstname" style="font-weight:600;">Complemento</label>
<input type="text" class="form-control"
value="{{old('complemento', $user->endereco->complemento)}}"
name="complemento" placeholder="Complemento" maxlength="75"
id="complemento"/>
<span style="color: red; font-size: 12px" id="caracsRestantescomplemento">
</span> </span>
@error('complemento') @error('complemento')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block"> <span class="invalid-feedback" role="alert"
style="overflow: visible; display:block">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div>
</div> </div>
</div>
<div class="col-md-12">
<div class="form-group">
<label for="linkLattes" class="col-form-label" style="font-weight:600;">{{ __('Link do Currículo Lattes') }}<span style="color: red; font-weight:bold;">*</span></label>
<input id="linkLattes" type="text" class="form-control @error('linkLattes') is-invalid @enderror" name="linkLattes" placeholder="Digite o link do currículo Lattes" @if ($user->participantes()->exists()) value="{{ old('linkLattes', $user->participantes()->first()->linkLattes) }}" @else value="{{ old('linkLattes') }}" @endif autocomplete="nome">
@error('linkLattes') <div class="col-md-12">
<span class="invalid-feedback" role="alert"> <div class="form-group">
<label for="linkLattes" class="col-form-label"
style="font-weight:600;">{{ __('Link do Currículo Lattes') }}<span
style="color: red; font-weight:bold;">*</span></label>
<input id="linkLattes" type="text"
class="form-control @error('linkLattes') is-invalid @enderror"
name="linkLattes" placeholder="Digite o link do currículo Lattes"
@if ($user->participantes()->exists()) value="{{ old('linkLattes', $user->participantes()->first()->linkLattes) }}"
@else value="{{ old('linkLattes') }}" @endif autocomplete="nome">
@error('linkLattes')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div>
</div> </div>
</div> <div class="col-md-12">
<div class="col-md-12"> <div class="d-flex justify-content-between align-items-center"
<div class="d-flex justify-content-between align-items-center" style="margin-bottom:-0.3rem"> style="margin-bottom:-0.3rem">
<h5 class="card-title" style="font-size:20px; font-family:Arial, Helvetica, sans-serif; font-family:Arial, Helvetica, sans-serif; ">Acesso ao sistema</h5> <h5 class="card-title"
<div class="form-group"> style="font-size:20px; font-family:Arial, Helvetica, sans-serif; font-family:Arial, Helvetica, sans-serif; ">
<input type="checkbox" id="alterarSenhaCheckBox" name="alterarSenhaCheckBox" onchange="habilitando()"> Acesso ao sistema</h5>
<label for="alterarSenhaCheckBox" style="color:#909090">Desejo alterar minha senha</label> <div class="form-group">
<input type="checkbox" id="alterarSenhaCheckBox" name="alterarSenhaCheckBox"
onchange="habilitando()">
<label for="alterarSenhaCheckBox" style="color:#909090">Desejo alterar minha
senha</label>
</div>
</div> </div>
</div> </div>
</div> <div class="col-md-6">
<div class="col-md-6"> <div class="form-group">
<div class="form-group"> <label for="emailFix" class="col-form-label">{{ __('E-mail*') }}</label>
<label for="emailFix" class="col-form-label">{{ __('E-mail*') }}</label> <input id="emailFix" type="email" class="form-control" value="{{$user->email}}"
<input id="emailFix" type="email" class="form-control" value="{{$user->email}}" disabled> disabled>
</div>
</div> </div>
</div> <div class="col-md-6">
<div class="col-md-6"> <div class="form-group">
<div class="form-group"> <label for="senha_atual" class="col-form-label">{{ __('Senha atual*') }}</label>
<label for="senha_atual" class="col-form-label">{{ __('Senha atual*') }}</label> <input id="senha_atual" type="password"
<input id="senha_atual" type="password" class="form-control @error('senha_atual') is-invalid @enderror" name="senha_atual" value="" disabled> class="form-control @error('senha_atual') is-invalid @enderror"
name="senha_atual" value="" disabled>
@error('senha_atual') @error('senha_atual')
<span class="invalid-feedback" role="alert"> <span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div>
</div> </div>
</div> <div class="col-md-6">
<div class="col-md-6"> <div class="form-group">
<div class="form-group"> <label for="nova_senha" class="col-form-label">{{ __('Nova senha*') }}</label>
<label for="nova_senha" class="col-form-label">{{ __('Nova senha*') }}</label> <input id="nova_senha" type="password"
<input id="nova_senha" type="password" class="form-control @error('nova_senha') is-invalid @enderror" name="nova_senha" value="" disabled> class="form-control @error('nova_senha') is-invalid @enderror"
name="nova_senha" value="" disabled>
@error('nova_senha') @error('nova_senha')
<span class="invalid-feedback" role="alert"> <span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div>
</div> </div>
</div> <div class="col-md-6">
<div class="col-md-6"> <div class="form-group">
<div class="form-group"> <label for="confirmar_senha"
<label for="confirmar_senha" class="col-form-label">{{ __('Confirmar nova senha*') }}</label> class="col-form-label">{{ __('Confirmar nova senha*') }}</label>
<input id="confirmar_senha" type="password" class="form-control @error('confirmar_senha') is-invalid @enderror" name="confirmar_senha" value="" disabled> <input id="confirmar_senha" type="password"
class="form-control @error('confirmar_senha') is-invalid @enderror"
@error('confirmar_senha') name="confirmar_senha" value="" disabled>
<span class="invalid-feedback" role="alert">
@error('confirmar_senha')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div> </div>
</div>
<div class="d-flex justify-content-between col-12">
<div>
<a class="btn btn-light botao-form" href="{{ route('home') }}" style="color:red; margin-left:5px;">Cancelar</a>
</div> </div>
<div> <div class="d-flex justify-content-between col-12">
<button type="submit" class="btn btn-success botao-form" style=""> <div>
{{ __('Atualizar') }} <a class="btn btn-light botao-form" href="{{ route('home') }}"
</button> style="color:red; margin-left:5px;">Cancelar</a>
</div>
<div>
<button type="submit" class="btn btn-success botao-form" style="">
{{ __('Atualizar') }}
</button>
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </form>
</form> </div>
</div>
@endsection @endsection
@section('javascript') @section('javascript')
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function($) { $(document).ready(function ($) {
$('#cpf').mask('000.000.000-00'); $('#cpf').mask('000.000.000-00');
var SPMaskBehavior = function(val) { var SPMaskBehavior = function (val) {
return val.replace(/\D/g, '').length === 11 ? '(00) 00000-0000' : '(00) 0000-00009'; return val.replace(/\D/g, '').length === 11 ? '(00) 00000-0000' : '(00) 0000-00009';
}, },
spOptions = { spOptions = {
onKeyPress: function(val, e, field, options) { onKeyPress: function (val, e, field, options) {
field.mask(SPMaskBehavior.apply({}, arguments), options); field.mask(SPMaskBehavior.apply({}, arguments), options);
} }
}; };
$('#celular').mask(SPMaskBehavior, spOptions); $('#celular').mask(SPMaskBehavior, spOptions);
$('#SIAPE').mask('00000000'); $('#SIAPE').mask('00000000');
$('#AnoTitulacao').mask('0000'); $('#AnoTitulacao').mask('0000');
$('#cep').mask('00000-000'); $('#cep').mask('00000-000');
}); });
function habilitando() { function habilitando() {
var checkbox = document.getElementById('alterarSenhaCheckBox'); var checkbox = document.getElementById('alterarSenhaCheckBox');
if (checkbox.checked) { if (checkbox.checked) {
document.getElementById('senha_atual').disabled = false; document.getElementById('senha_atual').disabled = false;
document.getElementById('nova_senha').disabled = false; document.getElementById('nova_senha').disabled = false;
document.getElementById('confirmar_senha').disabled = false; document.getElementById('confirmar_senha').disabled = false;
} else { } else {
document.getElementById('senha_atual').disabled = true; document.getElementById('senha_atual').disabled = true;
document.getElementById('nova_senha').disabled = true; document.getElementById('nova_senha').disabled = true;
document.getElementById('confirmar_senha').disabled = true; document.getElementById('confirmar_senha').disabled = true;
}
} }
}
function mudarPerfil() { function mudarPerfil() {
var divDataNascimento = document.getElementById('dataNascimento'); var divDataNascimento = document.getElementById('dataNascimento');
var divCurso = document.getElementById('curso'); var divCurso = document.getElementById('curso');
var divEndereco = document.getElementById('endereco'); var divEndereco = document.getElementById('endereco');
var divCep = document.getElementById('divCep'); var divCep = document.getElementById('divCep');
var divUf = document.getElementById('divUf'); var divUf = document.getElementById('divUf');
var divCidade = document.getElementById('divCidade'); var divCidade = document.getElementById('divCidade');
var divBairro = document.getElementById('divBairro'); var divBairro = document.getElementById('divBairro');
var divRua = document.getElementById('divRua'); var divRua = document.getElementById('divRua');
var divNumero = document.getElementById('numero'); var divNumero = document.getElementById('numero');
var divComplemento = document.getElementById('complemento'); var divComplemento = document.getElementById('complemento');
var divCursos = document.getElementById('divCursos'); var divCursos = document.getElementById('divCursos');
var divVinculo = document.getElementById('divVinculo'); var divVinculo = document.getElementById('divVinculo');
var divTitulacaoMax = document.getElementById('divTitulacaoMax'); var divTitulacaoMax = document.getElementById('divTitulacaoMax');
var divAnoTitulacao = document.getElementById('anoTitulacao'); var divAnoTitulacao = document.getElementById('anoTitulacao');
var divAreaFormacao = document.getElementById('areaFormacao'); var divAreaFormacao = document.getElementById('areaFormacao');
var divSIAPE = document.getElementById('siape'); var divSIAPE = document.getElementById('siape');
var divBolsista = document.getElementById('bolsista'); var divBolsista = document.getElementById('bolsista');
var divNivel = document.getElementById('nivelInput'); var divNivel = document.getElementById('nivelInput');
var divOutroVinculo = document.getElementById('divOutro'); var divOutroVinculo = document.getElementById('divOutro');
var comboBoxPerfil = document.getElementById('perfil'); var comboBoxPerfil = document.getElementById('perfil');
if(comboBoxPerfil.value === "Professor" || comboBoxPerfil.value === "Técnico" || comboBoxPerfil.value === "Outro"){ if (comboBoxPerfil.value === "Professor" || comboBoxPerfil.value === "Técnico" || comboBoxPerfil.value === "Outro") {
divVinculo.style.display = "block"; divVinculo.style.display = "block";
divTitulacaoMax.style.display = "block"; divTitulacaoMax.style.display = "block";
divAnoTitulacao.style.display = "block"; divAnoTitulacao.style.display = "block";
divAreaFormacao.style.display = "block"; divAreaFormacao.style.display = "block";
divSIAPE.style.display = "block"; divSIAPE.style.display = "block";
divBolsista.style.display = "block"; divBolsista.style.display = "block";
if (comboBoxPerfil.value === "Professor"){ if (comboBoxPerfil.value === "Professor") {
divCursos.style.display = "block"; divCursos.style.display = "block";
} else {
divCursos.style.display = "none";
}
} else { } else {
divVinculo.style.display = "none";
divTitulacaoMax.style.display = "none";
divAnoTitulacao.style.display = "none";
divAreaFormacao.style.display = "none";
divSIAPE.style.display = "none";
divBolsista.style.display = "none";
divCursos.style.display = "none"; divCursos.style.display = "none";
} }
if (comboBoxPerfil.value === "Estudante") {
divDataNascimento.style.display = "block";
divCurso.style.display = "block";
divEndereco.style.display = "block";
divCep.style.display = "block";
divUf.style.display = "block";
divCidade.style.display = "block";
divBairro.style.display = "block";
divRua.style.display = "block";
divNumero.style.display = "block";
divComplemento.style.display = "block";
divNivel.style.display = "none";
divOutroVinculo.style.display = "none";
} else { } else {
divVinculo.style.display = "none"; divDataNascimento.style.display = "none";
divTitulacaoMax.style.display = "none"; divCurso.style.display = "none";
divAnoTitulacao.style.display = "none"; divEndereco.style.display = "none";
divAreaFormacao.style.display = "none"; divCep.style.display = "none";
divSIAPE.style.display = "none"; divUf.style.display = "none";
divBolsista.style.display = "none"; divCidade.style.display = "none";
divCursos.style.display = "none"; divBairro.style.display = "none";
} divRua.style.display = "none";
divNumero.style.display = "none";
if(comboBoxPerfil.value === "Estudante"){ divComplemento.style.display = "none";
divDataNascimento.style.display = "block"; }
divCurso.style.display = "block";
divEndereco.style.display = "block"; outroPerfil();
divCep.style.display = "block"; outroVinculo();
divUf.style.display = "block";
divCidade.style.display = "block";
divBairro.style.display = "block";
divRua.style.display = "block";
divNumero.style.display = "block";
divComplemento.style.display = "block";
divNivel.style.display = "none";
divOutroVinculo.style.display = "none";
} else {
divDataNascimento.style.display = "none";
divCurso.style.display = "none";
divEndereco.style.display = "none";
divCep.style.display = "none";
divUf.style.display = "none";
divCidade.style.display = "none";
divBairro.style.display = "none";
divRua.style.display = "none";
divNumero.style.display = "none";
divComplemento.style.display = "none";
} }
outroPerfil(); function outroCurso() {
outroVinculo(); var comboBoxCurso = document.getElementById('cursoEstudante');
} var divCurso = document.getElementById('divCursoEstudante');
if (comboBoxCurso.value === "Outro") {
divCurso.style.display = "block";
} else {
divCurso.style.display = "none";
}
}
function outroCurso(){ function outroPerfil() {
var comboBoxCurso = document.getElementById('cursoEstudante'); var comboBoxPerfil = document.getElementById('perfil');
var divCurso = document.getElementById('divCursoEstudante'); var divOutro = document.getElementById('outroPerfil');
if (comboBoxCurso.value === "Outro") { if (comboBoxPerfil.value === "Outro") {
divCurso.style.display = "block"; divOutro.style.display = "block";
} else { } else {
divCurso.style.display = "none"; divOutro.style.display = "none";
}
} }
}
function outroPerfil() { function outroVinculo() {
var comboBoxPerfil = document.getElementById('perfil'); var comboBoxVinculo = document.getElementById('vinculo');
var divOutro = document.getElementById('outroPerfil'); var divOutro = document.getElementById('divOutro');
if (comboBoxPerfil.value === "Outro") { if (comboBoxVinculo.value === "Outro" && document.getElementById('perfil').value !== "Estudante") {
divOutro.style.display = "block"; divOutro.style.display = "block";
} else { } else {
divOutro.style.display = "none"; divOutro.style.display = "none";
}
} }
}
function outroVinculo() { function mudarNivel() {
var comboBoxVinculo = document.getElementById('vinculo'); var bolsista = document.getElementById('bolsistaProdutividade');
var divOutro = document.getElementById('divOutro'); var nivel = document.getElementById('nivelInput');
if (comboBoxVinculo.value === "Outro" && document.getElementById('perfil').value !== "Estudante") { if (bolsista.value === "sim") {
divOutro.style.display = "block"; nivel.style.display = "block";
} else { } else {
divOutro.style.display = "none"; nivel.style.display = "none";
}
} }
}
function mudarNivel() { function showInstituicao() {
var bolsista = document.getElementById('bolsistaProdutividade'); var instituicao = document.getElementById('instituicao');
var nivel = document.getElementById('nivelInput'); var instituicaoSelect = document.getElementById('instituicaoSelect');
var divOutroCurso = document.getElementById('divOutroCurso');
if (instituicaoSelect.value === "Outra") {
document.getElementById("displayOutro").style.display = "block";
divOutroCurso.style.display = "block";
instituicao.parentElement.style.display = '';
document.getElementById('instituicao').value = "";
} else if (instituicaoSelect.value === "UFAPE") {
document.getElementById("displayOutro").style.display = "none";
}
if (bolsista.value === "sim") { if (instituicaoSelect.value != "Outra") {
nivel.style.display = "block"; divOutroCurso.style.display = "none";
} else { }
nivel.style.display = "none";
} }
}
function onload() {
function showInstituicao() { mudarNivel();
var instituicao = document.getElementById('instituicao'); outroVinculo();
var instituicaoSelect = document.getElementById('instituicaoSelect'); mudarPerfil();
showInstituicao();
if (instituicaoSelect.value === "Outra") { outroCurso();
document.getElementById("displayOutro").style.display = "block";
instituicao.parentElement.style.display = '';
document.getElementById('instituicao').value = "";
} else if (instituicaoSelect.value === "UFAPE") {
document.getElementById("displayOutro").style.display = "none";
} }
}
window.onload = onload();
function onload() { </script>
mudarNivel();
outroVinculo(); <script>
mudarPerfil(); //----------------------------- Scripts para auto-complete de endereço --------------------------------//
showInstituicao();
outroCurso(); function limpa_formulário_cep() {
} //Limpa valores do formulário de cep.
window.onload = onload(); document.getElementById(`rua`).value = ("");
</script> document.getElementById(`bairro`).value = ("");
document.getElementById(`cidade`).value = ("");
<script> document.getElementById(`uf`).value = ("");
//----------------------------- Scripts para auto-complete de endereço --------------------------------// //document.getElementById('ibge').value=("");
function limpa_formulário_cep() {
//Limpa valores do formulário de cep.
document.getElementById(`rua`).value = ("");
document.getElementById(`bairro`).value = ("");
document.getElementById(`cidade`).value = ("");
document.getElementById(`uf`).value = ("");
//document.getElementById('ibge').value=("");
}
function meu_callback(conteudo) {
if (!("erro" in conteudo)) {
//Atualiza os campos com os valores.
document.getElementById(`rua`).value = (conteudo.logradouro);
document.getElementById(`bairro`).value = (conteudo.bairro);
document.getElementById(`cidade`).value = (conteudo.localidade);
document.getElementById(`uf`).value = (conteudo.uf);
//document.getElementById('ibge').value=(conteudo.ibge);
} //end if.
else {
//CEP não Encontrado.
limpa_formulário_cep();
alert("CEP não encontrado.");
} }
}
function pesquisaCep(valor) { function meu_callback(conteudo) {
//Nova variável "cep" somente com dígitos. if (!("erro" in conteudo)) {
var cep = valor.replace(/\D/g, ''); //Atualiza os campos com os valores.
document.getElementById(`rua`).value = (conteudo.logradouro);
document.getElementById(`bairro`).value = (conteudo.bairro);
document.getElementById(`cidade`).value = (conteudo.localidade);
document.getElementById(`uf`).value = (conteudo.uf);
//Verifica se campo cep possui valor informado.
if (cep != "") {
//Expressão regular para validar o CEP. //document.getElementById('ibge').value=(conteudo.ibge);
var validacep = /^[0-9]{8}$/; } //end if.
else {
//CEP não Encontrado.
limpa_formulário_cep();
alert("CEP não encontrado.");
}
}
function pesquisaCep(valor) {
//Nova variável "cep" somente com dígitos.
var cep = valor.replace(/\D/g, '');
//Verifica se campo cep possui valor informado.
if (cep != "") {
//Valida o formato do CEP. //Expressão regular para validar o CEP.
if (validacep.test(cep)) { var validacep = /^[0-9]{8}$/;
//Preenche os campos com "..." enquanto consulta webservice. //Valida o formato do CEP.
document.getElementById(`rua`).value = "..."; if (validacep.test(cep)) {
document.getElementById(`bairro`).value = "...";
document.getElementById(`cidade`).value = "...";
document.getElementById(`uf`).value = "...";
//document.getElementById('ibge').value="...";
//Cria um elemento javascript. //Preenche os campos com "..." enquanto consulta webservice.
var script = document.createElement('script'); document.getElementById(`rua`).value = "...";
document.getElementById(`bairro`).value = "...";
document.getElementById(`cidade`).value = "...";
document.getElementById(`uf`).value = "...";
//document.getElementById('ibge').value="...";
//Sincroniza com o callback. //Cria um elemento javascript.
script.src = 'https://viacep.com.br/ws/' + cep + '/json/?callback=meu_callback'; var script = document.createElement('script');
//Insere script no documento e carrega o conteúdo. //Sincroniza com o callback.
document.body.appendChild(script); script.src = 'https://viacep.com.br/ws/' + cep + '/json/?callback=meu_callback';
//Insere script no documento e carrega o conteúdo.
document.body.appendChild(script);
} //end if.
else {
//cep é inválido.
limpa_formulário_cep();
alert("Formato de CEP inválido.");
}
} //end if. } //end if.
else { else {
//cep é inválido. //cep sem valor, limpa formulário.
limpa_formulário_cep(); limpa_formulário_cep();
alert("Formato de CEP inválido.");
} }
} //end if. };
else { </script>
//cep sem valor, limpa formulário.
limpa_formulário_cep();
}
};
</script>
@endsection @endsection
\ No newline at end of file
@extends('layouts.app') @extends('layouts.app')
@section('styles') @section('styles')
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.13/css/select2.min.css" integrity="sha512-nMNlpuaDPrqlEls3IX/Q56H36qvBASwb3ipuo3MxeWbsQB1881ox0cRv7UPTgBlriqoynt35KjEwgGUeUXIPnw==" crossorigin="anonymous" referrerpolicy="no-referrer" /> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.13/css/select2.min.css"
integrity="sha512-nMNlpuaDPrqlEls3IX/Q56H36qvBASwb3ipuo3MxeWbsQB1881ox0cRv7UPTgBlriqoynt35KjEwgGUeUXIPnw=="
crossorigin="anonymous" referrerpolicy="no-referrer"/>
@endsection @endsection
@section('content') @section('content')
<div class="container" style="margin-top: 3rem;"> <div class="container" style="margin-top: 3rem;">
<form id="formEditUser" method="POST" action="{{ route('perfil.edit') }}"> <form id="formEditUser" method="POST" action="{{ route('perfil.edit') }}">
@csrf @csrf
<input type="hidden" name="tipo" value="{{ $user->tipo }}"> <input type="hidden" name="tipo" value="{{ $user->tipo }}">
@if(session('mensagem')) @if(session('mensagem'))
<div class="col-md-12" style="margin-top: 5px;"> <div class="col-md-12" style="margin-top: 5px;">
<div class="alert alert-success"> <div class="alert alert-success">
<p>{{session('mensagem')}}</p> <p>{{session('mensagem')}}</p>
</div> </div>
</div> </div>
@endif @endif
<div class="row justify-content-center"> <div class="row justify-content-center">
<div class="col-md-8" style="margin-bottom:20px"> <div class="col-md-8" style="margin-bottom:20px">
<div class="card shadow bg-white" style="border-radius:12px; border-width:0px;"> <div class="card shadow bg-white" style="border-radius:12px; border-width:0px;">
<div class="card-header" style="border-top-left-radius: 12px; border-top-right-radius: 12px; background-color: #fff"> <div class="card-header"
<div class="d-flex justify-content-between align-items-center" style="margin-top: 9px; margin-bottom:6px"> style="border-top-left-radius: 12px; border-top-right-radius: 12px; background-color: #fff">
<h5 class="card-title mb-0" style="font-size:25px; font-family:Arial, Helvetica, sans-serif; color:#1492E6">Meus dados</h5> <div class="d-flex justify-content-between align-items-center"
<h6 class="card-title mb-0" style="color:red">* Campos obrigatórios</h6> style="margin-top: 9px; margin-bottom:6px">
<h5 class="card-title mb-0"
style="font-size:25px; font-family:Arial, Helvetica, sans-serif; color:#1492E6">Meus
dados</h5>
<h6 class="card-title mb-0" style="color:red">* Campos obrigatórios</h6>
</div>
</div> </div>
</div> <div class="card-body">
<div class="card-body"> <div class="form-row">
<div class="form-row"> <div class="col-md-12">
<div class="col-md-12"> <div class="d-flex justify-content-between align-items-center"
<div class="d-flex justify-content-between align-items-center" style="margin-bottom:6px"> style="margin-bottom:6px">
<h5 class="card-title mb-0" style="font-size:20px; font-family:Arial, Helvetica, sans-serif; font-family:Arial, Helvetica, sans-serif; ">Informações pessoais</h5> <h5 class="card-title mb-0"
style="font-size:20px; font-family:Arial, Helvetica, sans-serif; font-family:Arial, Helvetica, sans-serif; ">
Informações pessoais</h5>
</div>
</div> </div>
</div> <div class="col-md-12">
<div class="col-md-12"> <div class="form-group">
<div class="form-group"> <label for="name" class="col-form-label">{{ __('Nome Completo*') }}</label>
<label for="name" class="col-form-label">{{ __('Nome Completo*') }}</label> <input id="name" type="text"
<input id="name" type="text" class="form-control @error('name') is-invalid @enderror" name="name" value="{{ $user->name }}" required autocomplete="name" autofocus> class="form-control @error('name') is-invalid @enderror" name="name"
value="{{ $user->name }}" required autocomplete="name" autofocus>
@error('name')
<span class="invalid-feedback" role="alert"> @error('name')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div>
</div> </div>
</div> <div class="col-md-6">
<div class="col-md-6"> <div class="form-group">
<div class="form-group"> <label for="cpf" class="col-form-label">{{ __('CPF*') }}</label>
<label for="cpf" class="col-form-label">{{ __('CPF*') }}</label> <input id="cpf" type="text"
<input id="cpf" type="text" class="form-control @error('cpf') is-invalid @enderror" name="cpf" value="{{ $user->cpf }}" required autocomplete="cpf" autofocus> class="form-control @error('cpf') is-invalid @enderror" name="cpf"
value="{{ $user->cpf }}" required autocomplete="cpf" autofocus>
@error('cpf')
<span class="invalid-feedback" role="alert"> @error('cpf')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div>
</div> </div>
</div> <div class="col-md-6">
<div class="col-md-6"> <div class="form-group">
<div class="form-group"> <label for="celular" class="col-form-label">{{ __('Celular*') }}</label>
<label for="celular" class="col-form-label">{{ __('Celular*') }}</label> <input id="celular" type="text"
<input id="celular" type="text" class="form-control @error('celular') is-invalid @enderror" name="celular" value="{{ $user->celular }}" required autocomplete="celular" autofocus> class="form-control @error('celular') is-invalid @enderror"
name="celular" value="{{ $user->celular }}" required
@error('celular') autocomplete="celular" autofocus>
<span class="invalid-feedback" role="alert">
@error('celular')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div>
</div> </div>
</div> <div class="col-md-12">
<div class="col-md-12"> <div class="d-flex justify-content-between align-items-center"
<div class="d-flex justify-content-between align-items-center" style="margin-bottom:6px"> style="margin-bottom:6px">
<h5 class="card-title mb-0" style="font-size:20px; font-family:Arial, Helvetica, sans-serif; font-family:Arial, Helvetica, sans-serif; ">Instituição</h5> <h5 class="card-title mb-0"
style="font-size:20px; font-family:Arial, Helvetica, sans-serif; font-family:Arial, Helvetica, sans-serif; ">
Instituição</h5>
</div>
</div> </div>
</div> <div class="col-md-12">
<div class="col-md-12"> <div class="form-group">
<div class="form-group"> <label class="col-form-label">{{ __('Instituição de Vínculo*') }}</label>
<label class="col-form-label">{{ __('Instituição de Vínculo*') }}</label> <select style="display: inline" onchange="showInstituicao()"
<select style="display: inline" onchange="showInstituicao()" class="form-control @error('instituicaoSelect') is-invalid @enderror" name="instituicaoSelect" id="instituicaoSelect"> class="form-control @error('instituicaoSelect') is-invalid @enderror"
<option value="" disabled hidden>-- Instituição --</option> name="instituicaoSelect" id="instituicaoSelect">
@if($user->instituicao != "UFAPE") <option value="" disabled hidden>-- Instituição --</option>
<option value="{{ $user->instituicao }}" selected>{{ $user->instituicao }}</option> @if($user->instituicao != "UFAPE")
@endif <option value="{{ $user->instituicao }}"
<option @if( $user->instituicao == "UFAPE") selected @endif value="UFAPE">Universidade Federal do Agreste de Pernambuco - UFAPE</option> selected>{{ $user->instituicao }}</option>
<option @if(old('instituicaoSelect')=="Outra" ) selected @endif value="Outra">Outra</option> @endif
</select> <option @if( $user->instituicao == "UFAPE") selected @endif value="UFAPE">
Universidade Federal do Agreste de Pernambuco - UFAPE
@error('instituicaoSelect') </option>
<span class="invalid-feedback" role="alert"> <option @if(old('instituicaoSelect')=="Outra" ) selected
@endif value="Outra">Outra
</option>
</select>
@error('instituicaoSelect')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div>
</div>
@if(isset($proponente) && $proponente->titulacaoMaxima != 'Técnico')
<div class="col-md-12 mb-2">
<label for="curso" class="col-form-label">{{ __('Cursos em que leciona*:') }}</label>
<br>
<div class="row col-md-12">
@foreach($cursos as $curso)
<div class="col-sm-6">
<input type="checkbox" name="curso[]" id="curso{{$curso->id}}" value="{{$curso->id}}" @if((empty(old('curso')) && $proponente->cursos->contains($curso->id)) || (!empty(old('curso')) && in_array($curso->id, old('curso')))) checked
@endif>
<label class="form-check-label" for="curso{{$curso->id}}">
{{ $curso->nome }}
</label>
</div> </div>
@endforeach
</div> </div>
</div> @if(isset($proponente) && $proponente->titulacaoMaxima != 'Técnico')
@endif <div class="col-md-12 mb-2">
<div class="col-md-12" id="displayOutro" style="display: none;"> <label for="curso"
<div class="form-group"> class="col-form-label">{{ __('Cursos em que leciona*:') }}</label>
<label for="instituicao" class="col-form-label">{{ __('Digite a Instituição*') }}</label> <br>
<input id="instituicao" type="text" class="form-control @error('instituicao') is-invalid @enderror" name="instituicao" value="{{ old('instituicao') }}" placeholder="Digite o nome da Instituição" autocomplete="instituicao" autofocus> <div class="row col-md-12">
@error('instituicao') @foreach($cursos as $curso)
<span class="invalid-feedback" role="alert"> @if($curso->nome == "Outro Curso")
<div id="divOutroCurso" class="col-sm-6" style="display: none">
<input type="checkbox" name="curso[]"
id="curso{{$curso->id}}"
value="{{$curso->id}}">
<label class="form-check-label" for="curso{{$curso->id}}">
{{ $curso->nome }}
</label>
</div>
@else
<div class="col-sm-6">
<input type="checkbox" name="curso[]" id="curso{{$curso->id}}"
value="{{$curso->id}}"
@if((empty(old('curso')) && $proponente->cursos->contains($curso->id)) || (!empty(old('curso')) && in_array($curso->id, old('curso')))) checked
@endif>
<label class="form-check-label" for="curso{{$curso->id}}">
{{ $curso->nome }}
</label>
</div>
@endif
@endforeach
</div>
</div>
@endif
<div class="col-md-12" id="displayOutro" style="display: none;">
<div class="form-group">
<label for="instituicao"
class="col-form-label">{{ __('Digite a Instituição*') }}</label>
<input id="instituicao" type="text"
class="form-control @error('instituicao') is-invalid @enderror"
name="instituicao" value="{{ old('instituicao') }}"
placeholder="Digite o nome da Instituição" autocomplete="instituicao"
autofocus>
@error('instituicao')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div>
</div> </div>
</div> @if(Auth()->user()->tipo == 'avaliador')
@if(Auth()->user()->tipo == 'avaliador') <div class="col-md-6">
<div class="col-md-6"> <label for="area" class="col-form-label">{{ __('Área temática:') }}</label>
<label for="area" class="col-form-label">{{ __('Área temática:') }}</label> <select style="display: inline"
<select style="display: inline" class="form-control @error('area') is-invalid @enderror" name="area[]" id="area" multiple="multiple"> class="form-control @error('area') is-invalid @enderror" name="area[]"
@foreach ($areaTematica as $area) id="area" multiple="multiple">
<option value="{{ $area->id }}" id="area{{$area->id}}" @if((empty(old('area')) && $avaliador->areaTematicas->contains($area->id)) || (!empty(old('area')) && in_array($area->id, old('area')))) selected @endif>{{ $area->nome }}</option> @foreach ($areaTematica as $area)
@endforeach <option value="{{ $area->id }}" id="area{{$area->id}}"
</select> @if((empty(old('area')) && $avaliador->areaTematicas->contains($area->id)) || (!empty(old('area')) && in_array($area->id, old('area')))) selected @endif>{{ $area->nome }}</option>
@error('area') @endforeach
<span class="invalid-feedback" role="alert"> </select>
@error('area')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<label for="area" class="col-form-label">{{ __('Natureza:') }}</label> <label for="area" class="col-form-label">{{ __('Natureza:') }}</label>
<br> <br>
@foreach($naturezas as $natureza) @foreach($naturezas as $natureza)
<input type="checkbox" name="natureza[]" id="natureza{{$natureza->id}}" value="{{$natureza->id}}" @if((empty(old('natureza')) && $avaliador->naturezas->contains($natureza->id)) || (!empty(old('natureza')) && in_array($natureza->id, old('natureza')))) checked @endif> <input type="checkbox" name="natureza[]" id="natureza{{$natureza->id}}"
<label class="form-check-label" for="natureza{{$natureza->id}}"> value="{{$natureza->id}}"
{{ $natureza->nome }} @if((empty(old('natureza')) && $avaliador->naturezas->contains($natureza->id)) || (!empty(old('natureza')) && in_array($natureza->id, old('natureza')))) checked @endif>
</label> <label class="form-check-label" for="natureza{{$natureza->id}}">
@endforeach {{ $natureza->nome }}
</div> </label>
@else @endforeach
</div>
<div class="col-md-6"> @else
<div class="form-group">
<label for="cargo" class="col-form-label">{{ __('Cargo*') }}</label>
<select id="cargo" name="cargo" class="form-control @error('cargo') is-invalid @enderror" onchange="">
<option value="" disabled selected hidden>-- Cargo --</option>
@isset($proponente)
<option @if( $proponente->cargo =='Professor' ) selected @endif value="Professor">Professor</option>
<option @if( $proponente->cargo =='Técnico' ) selected @endif value="Técnico">Técnico</option>
<option @if( $proponente->cargo =='Outro' ) selected @endif value="Outro">Outro</option>
@else
<option value="Professor">Professor</option>
<option value="Técnico">Técnico</option>
<option value="Outro">Outro</option>
@endisset
</select>
@error('cargo')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="vinculo" class="col-form-label">{{ __('Vínculo*') }}</label>
<select name="vinculo" id="vinculo" class="form-control @error('vinculo') is-invalid @enderror" onchange="outroVinculo()">
<option value="" disabled selected hidden>-- Vínculo --</option>
@isset($proponente)
<option @if($proponente->vinculo =='Servidor na ativa' ) selected @endif value="Servidor na ativa">Servidor na ativa</option>
<option @if($proponente->vinculo =='Servidor aposentado' ) selected @endif value="Servidor aposentado">Servidor aposentado</option>
<option @if($proponente->vinculo =='Professor visitante' ) selected @endif value="Professor visitante">Professor visitante</option>
<option @if($proponente->vinculo =='Pós-doutorando' ) selected @endif value="Pós-doutorando">Pós-doutorando</option>
<option @if($proponente->vinculo =='Outro' ) selected @endif value="Outro">Outro</option>
@if ($proponente->vinculo !='Servidor na ativa' && $proponente->vinculo !='Servidor aposentado' && $proponente->vinculo !='Professor visitante' && $proponente->vinculo !='Pós-doutorando' && $proponente->vinculo !='Outro')
<option value="{{ $proponente->vinculo }}" selected>{{ $proponente->vinculo }}</option>
@endif
@else
<option value="Servidor na ativa">Servidor na ativa</option>
<option value="Servidor aposentado">Servidor aposentado</option>
<option value="Professor visitante">Professor visitante</option>
<option value="Pós-doutorando">Pós-doutorando</option>
<option value="Outro">Outro</option>
@endisset
</select>
@error('vinculo')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div>
<div class="col-md-12" style="display: none;" id="divOutro">
<div class="form-group">
<label for="outro" class="col-form-label">{{ __('Qual?*') }}</label>
<input id="outro" type="text" class="form-control @error('outro') is-invalid @enderror" name="outro" placeholder="Escreva aqui o seu vínculo com a instituição." value="{{ old('outro') }}">
@error('outro')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div>
<div class="col-md-12" id="proponente" style="display: block;">
<div class="form-row">
<div class="col-md-6"> <div class="col-md-6">
<div class="form-group"> <div class="form-group">
<label for="titulacaoMaxima" class="col-form-label">{{ __('Titulação Máxima*') }}</label> <label for="cargo" class="col-form-label">{{ __('Cargo*') }}</label>
<select id="titulacaoMaxima" class="form-control @error('titulacaoMaxima') is-invalid @enderror" name="titulacaoMaxima" value="{{ old('titulacaoMaxima') }}" autocomplete="nome" , onchange="curso()"> <select id="cargo" name="cargo"
<option value="" disabled selected hidden>-- Titulação --</option> class="form-control @error('cargo') is-invalid @enderror"
onchange="">
<option value="" disabled selected hidden>-- Cargo --</option>
@isset($proponente) @isset($proponente)
<option @if( $proponente->titulacaoMaxima =='Doutorado' ) selected @endif value="Doutorado">Doutorado</option> <option @if( $proponente->cargo =='Professor' ) selected
<option @if( $proponente->titulacaoMaxima =='Mestrado' ) selected @endif value="Mestrado">Mestrado</option> @endif value="Professor">Professor
<option @if( $proponente->titulacaoMaxima =='Especialização' ) selected @endif value="Especialização">Especialização</option> </option>
<option @if( $proponente->titulacaoMaxima =='Graduação' ) selected @endif value="Graduação">Graduação</option> <option @if( $proponente->cargo =='Técnico' ) selected
<option @if( $proponente->titulacaoMaxima =='Técnico' ) selected @endif value="Técnico">Técnico</option> @endif value="Técnico">Técnico
</option>
<option @if( $proponente->cargo =='Outro' ) selected
@endif value="Outro">Outro
</option>
@else @else
<option value="Doutorado">Doutorado</option> <option value="Professor">Professor</option>
<option value="Mestrado">Mestrado</option> <option value="Técnico">Técnico</option>
<option value="Especialização">Especialização</option> <option value="Outro">Outro</option>
<option value="Graduação">Graduação</option>
<option value="Técnico">Técnico</option>
@endisset @endisset
</select> </select>
@error('titulacaoMaxima') @error('cargo')
<span class="invalid-feedback" role="alert"> <span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div> </div>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<div class="form-group"> <div class="form-group">
<label for="anoTitulacao" class="col-form-label">{{ __('Ano da Titulação*') }}</label> <label for="vinculo" class="col-form-label">{{ __('Vínculo*') }}</label>
<input id="anoTitulacao" type="text" class="form-control @error('anoTitulacao') is-invalid @enderror" name="anoTitulacao" value="@isset($proponente){{$proponente->anoTitulacao}}@endisset" autocomplete="nome"> <select name="vinculo" id="vinculo"
class="form-control @error('vinculo') is-invalid @enderror"
onchange="outroVinculo()">
<option value="" disabled selected hidden>-- Vínculo --</option>
@isset($proponente)
<option @if($proponente->vinculo =='Servidor na ativa' ) selected
@endif value="Servidor na ativa">Servidor na ativa
</option>
<option @if($proponente->vinculo =='Servidor aposentado' ) selected
@endif value="Servidor aposentado">Servidor aposentado
</option>
<option @if($proponente->vinculo =='Professor visitante' ) selected
@endif value="Professor visitante">Professor visitante
</option>
<option @if($proponente->vinculo =='Pós-doutorando' ) selected
@endif value="Pós-doutorando">Pós-doutorando
</option>
<option @if($proponente->vinculo =='Outro' ) selected
@endif value="Outro">Outro
</option>
@if ($proponente->vinculo !='Servidor na ativa' && $proponente->vinculo !='Servidor aposentado' && $proponente->vinculo !='Professor visitante' && $proponente->vinculo !='Pós-doutorando' && $proponente->vinculo !='Outro')
<option value="{{ $proponente->vinculo }}"
selected>{{ $proponente->vinculo }}</option>
@endif
@else
<option value="Servidor na ativa">Servidor na ativa</option>
<option value="Servidor aposentado">Servidor aposentado</option>
<option value="Professor visitante">Professor visitante</option>
<option value="Pós-doutorando">Pós-doutorando</option>
<option value="Outro">Outro</option>
@endisset
</select>
@error('anoTitulacao') @error('vinculo')
<span class="invalid-feedback" role="alert"> <span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div> </div>
</div> </div>
<div class="col-md-6"> <div class="col-md-12" style="display: none;" id="divOutro">
<div class="form-group"> <div class="form-group">
<label for="areaFormacao" class="col-form-label">{{ __('Área de Formação*') }}</label> <label for="outro" class="col-form-label">{{ __('Qual?*') }}</label>
<input id="areaFormacao" type="text" class="form-control @error('areaFormacao') is-invalid @enderror" name="areaFormacao" value="@isset($proponente){{$proponente->areaFormacao}}@endisset" autocomplete="nome"> <input id="outro" type="text"
class="form-control @error('outro') is-invalid @enderror"
@error('areaFormacao') name="outro"
placeholder="Escreva aqui o seu vínculo com a instituição."
value="{{ old('outro') }}">
@error('outro')
<span class="invalid-feedback" role="alert"> <span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div> </div>
</div> </div>
<div class="col-md-6"> <div class="col-md-12" id="proponente" style="display: block;">
<div class="form-group"> <div class="form-row">
<label for="SIAPE" class="col-form-label">{{ __('SIAPE') }}</label> <div class="col-md-6">
<input id="SIAPE" type="text" class="form-control @error('SIAPE') is-invalid @enderror" name="SIAPE" value="@isset($proponente){{$proponente->SIAPE}}@endisset" autocomplete="nome"> <div class="form-group">
<label for="titulacaoMaxima"
@error('SIAPE') class="col-form-label">{{ __('Titulação Máxima*') }}</label>
<span class="invalid-feedback" role="alert"> <select id="titulacaoMaxima"
class="form-control @error('titulacaoMaxima') is-invalid @enderror"
name="titulacaoMaxima" value="{{ old('titulacaoMaxima') }}"
autocomplete="nome" , onchange="curso()">
<option value="" disabled selected hidden>-- Titulação --
</option>
@isset($proponente)
<option @if( $proponente->titulacaoMaxima =='Doutorado' ) selected
@endif value="Doutorado">Doutorado
</option>
<option @if( $proponente->titulacaoMaxima =='Mestrado' ) selected
@endif value="Mestrado">Mestrado
</option>
<option @if( $proponente->titulacaoMaxima =='Especialização' ) selected
@endif value="Especialização">Especialização
</option>
<option @if( $proponente->titulacaoMaxima =='Graduação' ) selected
@endif value="Graduação">Graduação
</option>
<option @if( $proponente->titulacaoMaxima =='Técnico' ) selected
@endif value="Técnico">Técnico
</option>
@else
<option value="Doutorado">Doutorado</option>
<option value="Mestrado">Mestrado</option>
<option value="Especialização">Especialização</option>
<option value="Graduação">Graduação</option>
<option value="Técnico">Técnico</option>
@endisset
</select>
@error('titulacaoMaxima')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div> </div>
</div> </div>
<div class="col-md-12"> <div class="col-md-6">
<div class="form-group"> <div class="form-group">
<label for="linkLattes" class="col-form-label">{{ __('Link do currículo Lattes*') }}</label> <label for="anoTitulacao"
<input id="linkLattes" type="text" class="form-control @error('linkLattes') is-invalid @enderror" name="linkLattes" value="@isset($proponente){{$proponente->linkLattes}}@endisset" autocomplete="nome"> class="col-form-label">{{ __('Ano da Titulação*') }}</label>
<input id="anoTitulacao" type="text"
@error('linkLattes') class="form-control @error('anoTitulacao') is-invalid @enderror"
<span class="invalid-feedback" role="alert"> name="anoTitulacao"
value="@isset($proponente){{$proponente->anoTitulacao}}@endisset"
autocomplete="nome">
@error('anoTitulacao')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div> </div>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<div class="form-group"> <div class="form-group">
<label for="bolsistaProdutividade" class="col-form-label">{{ __('Bolsista de Produtividade*') }}</label><br> <label for="areaFormacao"
<select name="bolsistaProdutividade" id="bolsistaProdutividade" class="form-control @error('bolsistaProdutividade') is-invalid @enderror" onchange="mudarNivel()"> class="col-form-label">{{ __('Área de Formação*') }}</label>
<option value="" disabled selected hidden>-- Bolsista --</option> <input id="areaFormacao" type="text"
@isset($proponente) class="form-control @error('areaFormacao') is-invalid @enderror"
<option @if( $proponente->bolsistaProdutividade =='nao' ) selected @endif value="nao">Não</option> name="areaFormacao"
<option @if( $proponente->bolsistaProdutividade =='sim' ) selected @endif value="sim">Sim</option> value="@isset($proponente){{$proponente->areaFormacao}}@endisset"
@else autocomplete="nome">
<option value="nao">Não</option>
<option value="sim">Sim</option> @error('areaFormacao')
@endisset <span class="invalid-feedback" role="alert">
</select>
@error('bolsistaProdutividade')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div> </div>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
@if(isset($proponente) && $proponente->bolsistaProdutividade =='sim') <div class="form-group">
<div class="form-group" id="nivelInput" style="display: block;"> <label for="SIAPE" class="col-form-label">{{ __('SIAPE') }}</label>
<label for="nivel" class="col-form-label">{{ __('Nível*') }}</label> <input id="SIAPE" type="text"
<select name="nivel" id="nivel" class="form-control @error('nivel') is-invalid @enderror"> class="form-control @error('SIAPE') is-invalid @enderror"
<option value="" disabled selected hidden></option> name="SIAPE"
<option @if( $proponente->nivel =='1A' ) selected @endif value="1A">1A</option> value="@isset($proponente){{$proponente->SIAPE}}@endisset"
<option @if( $proponente->nivel =='1B' ) selected @endif value="1B">1B</option> autocomplete="nome">
<option @if( $proponente->nivel =='1C' ) selected @endif value="1C">1C</option>
<option @if( $proponente->nivel =='1D' ) selected @endif value="1D">1D</option> @error('SIAPE')
<option @if( $proponente->nivel =='2' ) selected @endif value="2">2</option> <span class="invalid-feedback" role="alert">
</select>
@error('nivel')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div> </div>
@else </div>
<div class="form-group" id="nivelInput" style="display: none;"> <div class="col-md-12">
<label for="nivel" class="col-form-label">{{ __('Nível*') }}</label> <div class="form-group">
<select name="nivel" id="nivel" class="form-control @error('nivel') is-invalid @enderror"> <label for="linkLattes"
<option value="" disabled selected hidden></option> class="col-form-label">{{ __('Link do currículo Lattes*') }}</label>
<option value="1A">1A</option> <input id="linkLattes" type="text"
<option value="1B">1B</option> class="form-control @error('linkLattes') is-invalid @enderror"
<option value="1C">1C</option> name="linkLattes"
<option value="1D">1D</option> value="@isset($proponente){{$proponente->linkLattes}}@endisset"
<option value="2">2</option> autocomplete="nome">
</select>
@error('nivel') @error('linkLattes')
<span class="invalid-feedback" role="alert"> <span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="bolsistaProdutividade"
class="col-form-label">{{ __('Bolsista de Produtividade*') }}</label><br>
<select name="bolsistaProdutividade" id="bolsistaProdutividade"
class="form-control @error('bolsistaProdutividade') is-invalid @enderror"
onchange="mudarNivel()">
<option value="" disabled selected hidden>-- Bolsista --
</option>
@isset($proponente)
<option @if( $proponente->bolsistaProdutividade =='nao' ) selected
@endif value="nao">Não
</option>
<option @if( $proponente->bolsistaProdutividade =='sim' ) selected
@endif value="sim">Sim
</option>
@else
<option value="nao">Não</option>
<option value="sim">Sim</option>
@endisset
</select>
@error('bolsistaProdutividade')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div>
<div class="col-md-6">
@if(isset($proponente) && $proponente->bolsistaProdutividade =='sim')
<div class="form-group" id="nivelInput" style="display: block;">
<label for="nivel"
class="col-form-label">{{ __('Nível*') }}</label>
<select name="nivel" id="nivel"
class="form-control @error('nivel') is-invalid @enderror">
<option value="" disabled selected hidden></option>
<option @if( $proponente->nivel =='1A' ) selected
@endif value="1A">1A
</option>
<option @if( $proponente->nivel =='1B' ) selected
@endif value="1B">1B
</option>
<option @if( $proponente->nivel =='1C' ) selected
@endif value="1C">1C
</option>
<option @if( $proponente->nivel =='1D' ) selected
@endif value="1D">1D
</option>
<option @if( $proponente->nivel =='2' ) selected
@endif value="2">2
</option>
</select>
@error('nivel')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
@else
<div class="form-group" id="nivelInput" style="display: none;">
<label for="nivel"
class="col-form-label">{{ __('Nível*') }}</label>
<select name="nivel" id="nivel"
class="form-control @error('nivel') is-invalid @enderror">
<option value="" disabled selected hidden></option>
<option value="1A">1A</option>
<option value="1B">1B</option>
<option value="1C">1C</option>
<option value="1D">1D</option>
<option value="2">2</option>
</select>
@error('nivel')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
@endif
</div>
</div> </div>
@endif
</div> </div>
</div> @endisset
</div> <div class="col-md-12">
@endisset <div class="d-flex justify-content-between align-items-center"
<div class="col-md-12"> style="margin-bottom:-0.3rem">
<div class="d-flex justify-content-between align-items-center" style="margin-bottom:-0.3rem"> <h5 class="card-title"
<h5 class="card-title" style="font-size:20px; font-family:Arial, Helvetica, sans-serif; font-family:Arial, Helvetica, sans-serif; ">Acesso ao sistema</h5> style="font-size:20px; font-family:Arial, Helvetica, sans-serif; font-family:Arial, Helvetica, sans-serif; ">
<div class="btn-group"> Acesso ao sistema</h5>
<input type="checkbox" id="alterarSenhaCheckBox" name="alterarSenhaCheckBox" onchange="habilitando()"> <div class="btn-group">
<label for="alterarSenhaCheckBox" style="margin-left: 10px; margin-top: -5px; color:#909090">Desejo alterar minha senha</label> <input type="checkbox" id="alterarSenhaCheckBox" name="alterarSenhaCheckBox"
onchange="habilitando()">
<label for="alterarSenhaCheckBox"
style="margin-left: 10px; margin-top: -5px; color:#909090">Desejo
alterar minha senha</label>
</div>
</div> </div>
</div> </div>
</div> <div class="col-md-6">
<div class="col-md-6"> <div class="form-group">
<div class="form-group"> <label for="emailFix" class="col-form-label">{{ __('E-mail*') }}</label>
<label for="emailFix" class="col-form-label">{{ __('E-mail*') }}</label> <input id="emailFix" type="email" class="form-control" value="{{$user->email}}"
<input id="emailFix" type="email" class="form-control" value="{{$user->email}}" disabled> disabled>
</div>
</div> </div>
</div> <div class="col-md-6">
<div class="col-md-6"> <div class="form-group">
<div class="form-group"> <label for="senha_atual" class="col-form-label">{{ __('Senha atual*') }}</label>
<label for="senha_atual" class="col-form-label">{{ __('Senha atual*') }}</label> <input id="senha_atual" type="password"
<input id="senha_atual" type="password" class="form-control @error('senha_atual') is-invalid @enderror" name="senha_atual" value="" disabled> class="form-control @error('senha_atual') is-invalid @enderror"
name="senha_atual" value="" disabled>
@error('senha_atual')
<span class="invalid-feedback" role="alert"> @error('senha_atual')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div>
</div> </div>
</div> <div class="col-md-6">
<div class="col-md-6"> <div class="form-group">
<div class="form-group"> <label for="nova_senha" class="col-form-label">{{ __('Nova senha*') }}</label>
<label for="nova_senha" class="col-form-label">{{ __('Nova senha*') }}</label> <input id="nova_senha" type="password"
<input id="nova_senha" type="password" class="form-control @error('nova_senha') is-invalid @enderror" name="nova_senha" value="" disabled> class="form-control @error('nova_senha') is-invalid @enderror"
name="nova_senha" value="" disabled>
@error('nova_senha')
<span class="invalid-feedback" role="alert"> @error('nova_senha')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div>
</div> </div>
</div> <div class="col-md-6">
<div class="col-md-6"> <div class="form-group">
<div class="form-group"> <label for="confirmar_senha"
<label for="confirmar_senha" class="col-form-label">{{ __('Confirmar nova senha*') }}</label> class="col-form-label">{{ __('Confirmar nova senha*') }}</label>
<input id="confirmar_senha" type="password" class="form-control @error('confirmar_senha') is-invalid @enderror" name="confirmar_senha" value="" disabled> <input id="confirmar_senha" type="password"
class="form-control @error('confirmar_senha') is-invalid @enderror"
@error('confirmar_senha') name="confirmar_senha" value="" disabled>
<span class="invalid-feedback" role="alert">
@error('confirmar_senha')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div> </div>
</div>
<div class="col-md-12">
<div>
<hr>
</div> </div>
<div class="d-flex justify-content-between"> <div class="col-md-12">
<div> <div>
<a class="btn btn-light botao-form" href="{{ route('home') }}" style="color:red; margin-left:5px;">Cancelar</a> <hr>
</div> </div>
<div> <div class="d-flex justify-content-between">
<button type="submit" class="btn btn-success botao-form" style="" onclick="submeterForm()"> <div>
{{ __('Atualizar') }} <a class="btn btn-light botao-form" href="{{ route('home') }}"
</button> style="color:red; margin-left:5px;">Cancelar</a>
</div>
<div>
<button type="submit" class="btn btn-success botao-form" style=""
onclick="submeterForm()">
{{ __('Atualizar') }}
</button>
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -423,248 +571,194 @@ ...@@ -423,248 +571,194 @@
</div> </div>
</div> </div>
</div> </div>
</div> </form>
</form>
</div>
{{--
<div class="container content">
<div class="row titulo">
<h1>Perfil</h1>
</div> </div>
{{--
<div class="container content">
<div class="row titulo">
<h1>Perfil</h1>
</div>
<div class="row subtitulo"> <div class="row subtitulo">
<div class="col-sm-12"> <div class="col-sm-12">
<p>Informações Pessoais</p> <p>Informações Pessoais</p>
</div>
</div> </div>
</div>
<form id="formEditUser" method="POST" action="{{ route('perfil.edit') }}"> <form id="formEditUser" method="POST" action="{{ route('perfil.edit') }}">
@csrf @csrf
{{-- Nome | CPF {{-- Nome | CPF
<div class="form-group row"> <div class="form-group row">
<input type="hidden" name="tipo" value="{{ $user->tipo }}"> <input type="hidden" name="tipo" value="{{ $user->tipo }}">
@if(session('mensagem')) @if(session('mensagem'))
<div class="col-md-12" style="margin-top: 5px;"> <div class="col-md-12" style="margin-top: 5px;">
<div class="alert alert-success"> <div class="alert alert-success">
<p>{{session('mensagem')}}</p> <p>{{session('mensagem')}}</p>
</div>
</div> </div>
</div>
@endif
<div class="col-md-8">
<label for="name" class="col-form-label">{{ __('Nome Completo*') }}</label>
<input id="name" type="text" class="form-control @error('name') is-invalid @enderror" name="name" value="{{ $user->name }}" required autocomplete="name" autofocus>
@error('name')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="col-md-4">
<label for="cpf" class="col-form-label">{{ __('CPF*') }}</label>
<input id="cpf" type="text" class="form-control @error('cpf') is-invalid @enderror" name="cpf" value="{{ $user->cpf }}" required autocomplete="cpf" autofocus>
@error('cpf')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div>
{{-- Instituição de Ensino e Celular
<div class="form-group row">
<div class="col-md-6">
<label class="col-form-label">{{ __('Instituição de Vínculo*') }}</label>
<select style="display: inline" onchange="showInstituicao()" class="form-control @error('instituicaoSelect') is-invalid @enderror" name="instituicaoSelect" id="instituicaoSelect">
<option value="" disabled hidden>-- Instituição --</option>
@if($user->instituicao != "UFAPE")
<option value="{{ $user->instituicao }}" selected>{{ $user->instituicao }}</option>
@endif @endif
<option @if( $user->instituicao == "UFAPE") selected @endif value="UFAPE">Universidade Federal do Agreste de Pernambuco - UFAPE</option> <div class="col-md-8">
<option @if(old('instituicaoSelect')=="Outra" ) selected @endif value="Outra">Outra</option> <label for="name" class="col-form-label">{{ __('Nome Completo*') }}</label>
</select> <input id="name" type="text" class="form-control @error('name') is-invalid @enderror" name="name" value="{{ $user->name }}" required autocomplete="name" autofocus>
@error('instituicaoSelect') @error('name')
<span class="invalid-feedback" role="alert"> <span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div> </div>
<div class='col-md-4' style="display: none;">
<label for="instituicao" class="col-form-label">{{ __('Digite a Instituição*') }}</label>
<input id="instituicao" type="text" class="form-control @error('instituicao') is-invalid @enderror" name="instituicao" value="{{ old('instituicao') }}" placeholder="Digite o nome da Instituição" autocomplete="instituicao" autofocus>
@error('instituicao')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="col-md-2">
<label for="celular" class="col-form-label">{{ __('Celular*') }}</label>
<input id="celular" type="text" class="form-control @error('celular') is-invalid @enderror" name="celular" value="{{ $user->celular }}" required autocomplete="celular" autofocus>
@error('celular')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="col-md-4">
<label for="email" class="col-form-label">{{ __('E-mail*') }}</label>
<input id="email" type="email" class="form-control @error('email') is-invalid @enderror" name="email" value="{{ $user->email }}" disabled>
@error('email') <div class="col-md-4">
<span class="invalid-feedback" role="alert"> <label for="cpf" class="col-form-label">{{ __('CPF*') }}</label>
<strong>{{ $message }}</strong> <input id="cpf" type="text" class="form-control @error('cpf') is-invalid @enderror" name="cpf" value="{{ $user->cpf }}" required autocomplete="cpf" autofocus>
</span>
@enderror @error('cpf')
</div> <span class="invalid-feedback" role="alert">
@if(Auth()->user()->avaliadors) <strong>{{ $message }}</strong>
<div class="col-md-4"> </span>
<label for="area" class="col-form-label">{{ __('Área:') }}</label> @enderror
<select style="display: inline" class="form-control @error('area') is-invalid @enderror" name="area" id="area"> </div>
@if(Auth()->user()->avaliadors->area_id == null) </div>
<option value="" selected>Indefinida</option> {{-- Instituição de Ensino e Celular
@foreach (App\Area::all() as $area) <div class="form-group row">
@if(Auth()->user()->avaliadors->area_id == $area->id) <div class="col-md-6">
<option value="{{ $area->id }}" selected>{{ $area->nome }}</option> <label class="col-form-label">{{ __('Instituição de Vínculo*') }}</label>
@else <select style="display: inline" onchange="showInstituicao()" class="form-control @error('instituicaoSelect') is-invalid @enderror" name="instituicaoSelect" id="instituicaoSelect">
<option value="{{ $area->id }}">{{ $area->nome }}</option> <option value="" disabled hidden>-- Instituição --</option>
@endif @if($user->instituicao != "UFAPE")
@endforeach <option value="{{ $user->instituicao }}" selected>{{ $user->instituicao }}</option>
@else
@foreach (App\Area::all() as $area)
@if(Auth()->user()->avaliadors->area_id == $area->id)
<option value="{{ $area->id }}" selected>{{ $area->nome }}</option>
@else
<option value="{{ $area->id }}">{{ $area->nome }}</option>
@endif
@endforeach
@endif @endif
<option @if( $user->instituicao == "UFAPE") selected @endif value="UFAPE">Universidade Federal do Agreste de Pernambuco - UFAPE</option>
<option @if(old('instituicaoSelect')=="Outra" ) selected @endif value="Outra">Outra</option>
</select> </select>
@error('area') @error('instituicaoSelect')
<span class="invalid-feedback" role="alert"> <span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div> </div>
@endif <div class='col-md-4' style="display: none;">
</div> <label for="instituicao" class="col-form-label">{{ __('Digite a Instituição*') }}</label>
<div class="form-group row"> <input id="instituicao" type="text" class="form-control @error('instituicao') is-invalid @enderror" name="instituicao" value="{{ old('instituicao') }}" placeholder="Digite o nome da Instituição" autocomplete="instituicao" autofocus>
@error('instituicao')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="col-md-2">
<label for="celular" class="col-form-label">{{ __('Celular*') }}</label>
<input id="celular" type="text" class="form-control @error('celular') is-invalid @enderror" name="celular" value="{{ $user->celular }}" required autocomplete="celular" autofocus>
@error('celular')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="col-md-4"> <div class="col-md-4">
<input type="checkbox" id="alterarSenhaCheckBox" name="alterarSenhaCheckBox" onchange="habilitando()"> <label for="email" class="col-form-label">{{ __('E-mail*') }}</label>
<label for="alterarSenhaCheckBox">Desejo alterar minha senha</label> <input id="email" type="email" class="form-control @error('email') is-invalid @enderror" name="email" value="{{ $user->email }}" disabled>
@error('email')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div> </div>
</div> @if(Auth()->user()->avaliadors)
{{-- Email | Senha | Confirmar Senha <div class="col-md-4">
<div class="form-group row"> <label for="area" class="col-form-label">{{ __('Área:') }}</label>
<div class="col-md-4"> <select style="display: inline" class="form-control @error('area') is-invalid @enderror" name="area" id="area">
<label for="senha_atual" class="col-form-label">{{ __('Senha atual*') }}</label> @if(Auth()->user()->avaliadors->area_id == null)
<input id="senha_atual" type="password" class="form-control @error('senha_atual') is-invalid @enderror" name="senha_atual" value="" disabled> <option value="" selected>Indefinida</option>
@foreach (App\Area::all() as $area)
@error('senha_atual') @if(Auth()->user()->avaliadors->area_id == $area->id)
<span class="invalid-feedback" role="alert"> <option value="{{ $area->id }}" selected>{{ $area->nome }}</option>
<strong>{{ $message }}</strong> @else
</span> <option value="{{ $area->id }}">{{ $area->nome }}</option>
@enderror @endif
</div> @endforeach
@else
<div class="col-md-4"> @foreach (App\Area::all() as $area)
<label for="nova_senha" class="col-form-label">{{ __('Nova senha*') }}</label> @if(Auth()->user()->avaliadors->area_id == $area->id)
<input id="nova_senha" type="password" class="form-control @error('nova_senha') is-invalid @enderror" name="nova_senha" value="" disabled> <option value="{{ $area->id }}" selected>{{ $area->nome }}</option>
@else
<option value="{{ $area->id }}">{{ $area->nome }}</option>
@endif
@endforeach
@endif
@error('nova_senha') </select>
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="col-md-4"> @error('area')
<label for="confirmar_senha" class="col-form-label">{{ __('Confirmar nova senha*') }}</label> <span class="invalid-feedback" role="alert">
<input id="confirmar_senha" type="password" class="form-control @error('confirmar_senha') is-invalid @enderror" name="confirmar_senha" value="" disabled> <strong>{{ $message }}</strong>
</span>
@enderror
</div>
@endif
</div>
<div class="form-group row">
<div class="col-md-4">
<input type="checkbox" id="alterarSenhaCheckBox" name="alterarSenhaCheckBox" onchange="habilitando()">
<label for="alterarSenhaCheckBox">Desejo alterar minha senha</label>
</div>
</div>
{{-- Email | Senha | Confirmar Senha
<div class="form-group row">
<div class="col-md-4">
<label for="senha_atual" class="col-form-label">{{ __('Senha atual*') }}</label>
<input id="senha_atual" type="password" class="form-control @error('senha_atual') is-invalid @enderror" name="senha_atual" value="" disabled>
@error('confirmar_senha') @error('senha_atual')
<span class="invalid-feedback" role="alert"> <span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div>
</div>
@if(isset($proponente))
<div id="proponente" style="display: block;">
<div>
<h4>Dados de proponente</h4>
</div> </div>
<div class="form-group row">
<div class="col-md-4">
<label for="cargo" class="col-form-label">{{ __('Cargo*') }}</label>
<select id="cargo" name="cargo" class="form-control @error('cargo') is-invalid @enderror" onchange="">
<option value="" disabled selected hidden>-- Cargo --</option>
<option @if( $proponente->cargo =='Professor' ) selected @endif value="Professor">Professor</option>
<option @if( $proponente->cargo =='Técnico' ) selected @endif value="Técnico">Técnico</option>
<option @if( $proponente->cargo =='Estudante' ) selected @endif value="Estudante">Estudante</option>
</select>
@error('cargo')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="col-md-4"> <div class="col-md-4">
<label for="vinculo" class="col-form-label">{{ __('Vínculo*') }}</label> <label for="nova_senha" class="col-form-label">{{ __('Nova senha*') }}</label>
<select name="vinculo" id="vinculo" class="form-control @error('vinculo') is-invalid @enderror" onchange="outroVinculo()"> <input id="nova_senha" type="password" class="form-control @error('nova_senha') is-invalid @enderror" name="nova_senha" value="" disabled>
<option value="" disabled selected hidden>-- Vínculo --</option>
<option @if($proponente->vinculo =='Servidor na ativa' ) selected @endif value="Servidor na ativa">Servidor na ativa</option> @error('nova_senha')
<option @if($proponente->vinculo =='Servidor aposentado' ) selected @endif value="Servidor aposentado">Servidor aposentado</option> <span class="invalid-feedback" role="alert">
<option @if($proponente->vinculo =='Professor visitante' ) selected @endif value="Professor visitante">Professor visitante</option> <strong>{{ $message }}</strong>
<option @if($proponente->vinculo =='Pós-doutorando' ) selected @endif value="Pós-doutorando">Pós-doutorando</option> </span>
<option @if($proponente->vinculo =='Outro' ) selected @endif value="Outro">Outro</option> @enderror
@if ($proponente->vinculo !='Servidor na ativa' && $proponente->vinculo !='Servidor aposentado' && $proponente->vinculo !='Professor visitante' && $proponente->vinculo !='Pós-doutorando' && $proponente->vinculo !='Outro') </div>
<option value="{{ $proponente->vinculo }}" selected>{{ $proponente->vinculo }}</option>
@endif
</select>
@error('vinculo') <div class="col-md-4">
<span class="invalid-feedback" role="alert"> <label for="confirmar_senha" class="col-form-label">{{ __('Confirmar nova senha*') }}</label>
<strong>{{ $message }}</strong> <input id="confirmar_senha" type="password" class="form-control @error('confirmar_senha') is-invalid @enderror" name="confirmar_senha" value="" disabled>
</span>
@enderror @error('confirmar_senha')
</div> <span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div>
<div class="col-md-4" style="display: none;" id="divOutro"> @if(isset($proponente))
<label for="outro" class="col-form-label">{{ __('Qual?*') }}</label> <div id="proponente" style="display: block;">
<input id="outro" type="text" class="form-control @error('outro') is-invalid @enderror" name="outro" value="{{ old('outro') }}">
@error('outro') <div>
<span class="invalid-feedback" role="alert"> <h4>Dados de proponente</h4>
<strong>{{ $message }}</strong>
</span>
@enderror
</div> </div>
</div>
<div style="display: block;">
<div class="form-group row"> <div class="form-group row">
<div class="col-md-4"> <div class="col-md-4">
<label for="titulacaoMaxima" class="col-form-label">{{ __('Titulação Máxima*') }}</label> <label for="cargo" class="col-form-label">{{ __('Cargo*') }}</label>
<select id="titulacaoMaxima" class="form-control @error('titulacaoMaxima') is-invalid @enderror" name="titulacaoMaxima" value="{{ old('titulacaoMaxima') }}" autocomplete="nome"> <select id="cargo" name="cargo" class="form-control @error('cargo') is-invalid @enderror" onchange="">
<option value="" disabled selected hidden>-- Titulação --</option> <option value="" disabled selected hidden>-- Cargo --</option>
<option @if( $proponente->titulacaoMaxima =='Doutorado' ) selected @endif value="Doutorado">Doutorado</option> <option @if( $proponente->cargo =='Professor' ) selected @endif value="Professor">Professor</option>
<option @if( $proponente->titulacaoMaxima =='Mestrado' ) selected @endif value="Mestrado">Mestrado</option> <option @if( $proponente->cargo =='Técnico' ) selected @endif value="Técnico">Técnico</option>
<option @if( $proponente->titulacaoMaxima =='Especialização' ) selected @endif value="Especialização">Especialização</option> <option @if( $proponente->cargo =='Estudante' ) selected @endif value="Estudante">Estudante</option>
<option @if( $proponente->titulacaoMaxima =='Graduação' ) selected @endif value="Graduação">Graduação</option>
<option @if( $proponente->titulacaoMaxima =='Técnico' ) selected @endif value="Técnico">Técnico</option>
</select> </select>
@error('titulacaoMaxima') @error('cargo')
<span class="invalid-feedback" role="alert"> <span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
...@@ -672,20 +766,31 @@ ...@@ -672,20 +766,31 @@
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<label for="anoTitulacao" class="col-form-label">{{ __('Ano da Titulação*') }}</label> <label for="vinculo" class="col-form-label">{{ __('Vínculo*') }}</label>
<input id="anoTitulacao" type="text" class="form-control @error('anoTitulacao') is-invalid @enderror" name="anoTitulacao" value="{{ $proponente->anoTitulacao }}" autocomplete="nome"> <select name="vinculo" id="vinculo" class="form-control @error('vinculo') is-invalid @enderror" onchange="outroVinculo()">
<option value="" disabled selected hidden>-- Vínculo --</option>
<option @if($proponente->vinculo =='Servidor na ativa' ) selected @endif value="Servidor na ativa">Servidor na ativa</option>
<option @if($proponente->vinculo =='Servidor aposentado' ) selected @endif value="Servidor aposentado">Servidor aposentado</option>
<option @if($proponente->vinculo =='Professor visitante' ) selected @endif value="Professor visitante">Professor visitante</option>
<option @if($proponente->vinculo =='Pós-doutorando' ) selected @endif value="Pós-doutorando">Pós-doutorando</option>
<option @if($proponente->vinculo =='Outro' ) selected @endif value="Outro">Outro</option>
@if ($proponente->vinculo !='Servidor na ativa' && $proponente->vinculo !='Servidor aposentado' && $proponente->vinculo !='Professor visitante' && $proponente->vinculo !='Pós-doutorando' && $proponente->vinculo !='Outro')
<option value="{{ $proponente->vinculo }}" selected>{{ $proponente->vinculo }}</option>
@endif
</select>
@error('anoTitulacao') @error('vinculo')
<span class="invalid-feedback" role="alert"> <span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div> </div>
<div class="col-md-4">
<label for="areaFormacao" class="col-form-label">{{ __('Área de Formação*') }}</label>
<input id="areaFormacao" type="text" class="form-control @error('areaFormacao') is-invalid @enderror" name="areaFormacao" value="{{ $proponente->areaFormacao }}" autocomplete="nome">
@error('areaFormacao') <div class="col-md-4" style="display: none;" id="divOutro">
<label for="outro" class="col-form-label">{{ __('Qual?*') }}</label>
<input id="outro" type="text" class="form-control @error('outro') is-invalid @enderror" name="outro" value="{{ old('outro') }}">
@error('outro')
<span class="invalid-feedback" role="alert"> <span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
...@@ -693,247 +798,295 @@ ...@@ -693,247 +798,295 @@
</div> </div>
</div> </div>
<div class="form-group row"> <div style="display: block;">
<div class="form-group row">
<div class="col-md-4">
<label for="titulacaoMaxima" class="col-form-label">{{ __('Titulação Máxima*') }}</label>
<select id="titulacaoMaxima" class="form-control @error('titulacaoMaxima') is-invalid @enderror" name="titulacaoMaxima" value="{{ old('titulacaoMaxima') }}" autocomplete="nome">
<option value="" disabled selected hidden>-- Titulação --</option>
<option @if( $proponente->titulacaoMaxima =='Doutorado' ) selected @endif value="Doutorado">Doutorado</option>
<option @if( $proponente->titulacaoMaxima =='Mestrado' ) selected @endif value="Mestrado">Mestrado</option>
<option @if( $proponente->titulacaoMaxima =='Especialização' ) selected @endif value="Especialização">Especialização</option>
<option @if( $proponente->titulacaoMaxima =='Graduação' ) selected @endif value="Graduação">Graduação</option>
<option @if( $proponente->titulacaoMaxima =='Técnico' ) selected @endif value="Técnico">Técnico</option>
</select>
@error('titulacaoMaxima')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="col-md-4"> <div class="col-md-4">
<label for="SIAPE" class="col-form-label">{{ __('SIAPE') }}</label> <label for="anoTitulacao" class="col-form-label">{{ __('Ano da Titulação*') }}</label>
<input id="SIAPE" type="text" class="form-control @error('SIAPE') is-invalid @enderror" name="SIAPE" value="{{ $proponente->SIAPE }}" autocomplete="nome"> <input id="anoTitulacao" type="text" class="form-control @error('anoTitulacao') is-invalid @enderror" name="anoTitulacao" value="{{ $proponente->anoTitulacao }}" autocomplete="nome">
@error('SIAPE') @error('anoTitulacao')
<span class="invalid-feedback" role="alert"> <span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div>
<div class="col-md-4">
<label for="areaFormacao" class="col-form-label">{{ __('Área de Formação*') }}</label>
<input id="areaFormacao" type="text" class="form-control @error('areaFormacao') is-invalid @enderror" name="areaFormacao" value="{{ $proponente->areaFormacao }}" autocomplete="nome">
@error('areaFormacao')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div> </div>
<div class="col-md-4"> <div class="form-group row">
<label for="linkLattes" class="col-form-label">{{ __('Link do currículo Lattes*') }}</label>
<input id="linkLattes" type="text" class="form-control @error('linkLattes') is-invalid @enderror" name="linkLattes" value="{{ $proponente->linkLattes }}" autocomplete="nome">
@error('linkLattes') <div class="col-md-4">
<span class="invalid-feedback" role="alert"> <label for="SIAPE" class="col-form-label">{{ __('SIAPE') }}</label>
<strong>{{ $message }}</strong> <input id="SIAPE" type="text" class="form-control @error('SIAPE') is-invalid @enderror" name="SIAPE" value="{{ $proponente->SIAPE }}" autocomplete="nome">
</span>
@enderror
</div>
<div class="col-md-3"> @error('SIAPE')
<label for="bolsistaProdutividade" class="col-form-label">{{ __('Bolsista de Produtividade*') }}</label><br> <span class="invalid-feedback" role="alert">
<select name="bolsistaProdutividade" id="bolsistaProdutividade" class="form-control @error('bolsistaProdutividade') is-invalid @enderror" onchange="mudarNivel()"> <strong>{{ $message }}</strong>
<option value="" disabled selected hidden>-- Bolsista --</option> </span>
<option @if( $proponente->bolsistaProdutividade =='nao' ) selected @endif value="nao">Não</option> @enderror
<option @if( $proponente->bolsistaProdutividade =='sim' ) selected @endif value="sim">Sim</option> </div>
</select>
@error('bolsistaProdutividade')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
@if ($proponente->bolsistaProdutividade =='sim') <div class="col-md-4">
<div class="col-md-1" id="nivelInput" style="display: block;"> <label for="linkLattes" class="col-form-label">{{ __('Link do currículo Lattes*') }}</label>
<label for="nivel" class="col-form-label">{{ __('Nível*') }}</label> <input id="linkLattes" type="text" class="form-control @error('linkLattes') is-invalid @enderror" name="linkLattes" value="{{ $proponente->linkLattes }}" autocomplete="nome">
<select name="nivel" id="nivel" class="form-control @error('nivel') is-invalid @enderror">
<option value="" disabled selected hidden></option> @error('linkLattes')
<option @if( $proponente->nivel =='1A' ) selected @endif value="1A">1A</option> <span class="invalid-feedback" role="alert">
<option @if( $proponente->nivel =='1B' ) selected @endif value="1B">1B</option> <strong>{{ $message }}</strong>
<option @if( $proponente->nivel =='1C' ) selected @endif value="1C">1C</option> </span>
<option @if( $proponente->nivel =='1D' ) selected @endif value="1D">1D</option> @enderror
<option @if( $proponente->nivel =='2' ) selected @endif value="2">2</option> </div>
</select>
@error('nivel') <div class="col-md-3">
<span class="invalid-feedback" role="alert"> <label for="bolsistaProdutividade" class="col-form-label">{{ __('Bolsista de Produtividade*') }}</label><br>
<strong>{{ $message }}</strong> <select name="bolsistaProdutividade" id="bolsistaProdutividade" class="form-control @error('bolsistaProdutividade') is-invalid @enderror" onchange="mudarNivel()">
</span> <option value="" disabled selected hidden>-- Bolsista --</option>
@enderror <option @if( $proponente->bolsistaProdutividade =='nao' ) selected @endif value="nao">Não</option>
</div> <option @if( $proponente->bolsistaProdutividade =='sim' ) selected @endif value="sim">Sim</option>
@else </select>
<div class="col-md-1" id="nivelInput" style="display: none;"> @error('bolsistaProdutividade')
<label for="nivel" class="col-form-label">{{ __('Nível*') }}</label> <span class="invalid-feedback" role="alert">
<select name="nivel" id="nivel" class="form-control @error('nivel') is-invalid @enderror"> <strong>{{ $message }}</strong>
<option value="" disabled selected hidden></option> </span>
<option value="1A">1A</option> @enderror
<option value="1B">1B</option> </div>
<option value="1C">1C</option>
<option value="1D">1D</option> @if ($proponente->bolsistaProdutividade =='sim')
<option value="2">2</option> <div class="col-md-1" id="nivelInput" style="display: block;">
</select> <label for="nivel" class="col-form-label">{{ __('Nível*') }}</label>
@error('nivel') <select name="nivel" id="nivel" class="form-control @error('nivel') is-invalid @enderror">
<span class="invalid-feedback" role="alert"> <option value="" disabled selected hidden></option>
<strong>{{ $message }}</strong> <option @if( $proponente->nivel =='1A' ) selected @endif value="1A">1A</option>
</span> <option @if( $proponente->nivel =='1B' ) selected @endif value="1B">1B</option>
@enderror <option @if( $proponente->nivel =='1C' ) selected @endif value="1C">1C</option>
<option @if( $proponente->nivel =='1D' ) selected @endif value="1D">1D</option>
<option @if( $proponente->nivel =='2' ) selected @endif value="2">2</option>
</select>
@error('nivel')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
@else
<div class="col-md-1" id="nivelInput" style="display: none;">
<label for="nivel" class="col-form-label">{{ __('Nível*') }}</label>
<select name="nivel" id="nivel" class="form-control @error('nivel') is-invalid @enderror">
<option value="" disabled selected hidden></option>
<option value="1A">1A</option>
<option value="1B">1B</option>
<option value="1C">1C</option>
<option value="1D">1D</option>
<option value="2">2</option>
</select>
@error('nivel')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
@endif
</div> </div>
@endif
</div> </div>
</div> </div>
</div> </div>
</div> @endif
@endif </form>
</form>
<div class="container"> <div class="container">
<div class="row justify-content-center" style="margin: 20px 0 20px 0"> <div class="row justify-content-center" style="margin: 20px 0 20px 0">
<div class="col-md-6" style="padding-left:0"> <div class="col-md-6" style="padding-left:0">
<a class="btn btn-secondary botao-form" href="{{ route('home') }}" style="width:100%">Cancelar</a> <a class="btn btn-secondary botao-form" href="{{ route('home') }}" style="width:100%">Cancelar</a>
</div> </div>
<div class="col-md-6" style="padding-right:0"> <div class="col-md-6" style="padding-right:0">
<button type="submit" class="btn btn-primary botao-form" style="width:100%" onclick="submeterForm()"> <button type="submit" class="btn btn-primary botao-form" style="width:100%" onclick="submeterForm()">
{{ __('Salvar') }} {{ __('Salvar') }}
</button> </button>
</div>
</div> </div>
</div> </div>
</div> </div>
</div> --}}
--}}
@endsection @endsection
@section('javascript') @section('javascript')
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.13/js/select2.min.js" integrity="sha512-2ImtlRlf2VVmiGZsjm9bEyhjGW4dU7B6TNwh/hx/iSByxNENtj3WVE6o/9Lj4TJeVXPi4bnOIMXFIJJAeufa0A==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.13/js/select2.min.js"
<script type="text/javascript"> integrity="sha512-2ImtlRlf2VVmiGZsjm9bEyhjGW4dU7B6TNwh/hx/iSByxNENtj3WVE6o/9Lj4TJeVXPi4bnOIMXFIJJAeufa0A=="
$("#area").select2({ crossorigin="anonymous" referrerpolicy="no-referrer"></script>
placeholder: 'Selecione as áreas temáticas', <script type="text/javascript">
allowClear: true $("#area").select2({
}); placeholder: 'Selecione as áreas temáticas',
</script> allowClear: true
});
<script type="text/javascript"> </script>
//var emailInput = document.getElementById('email');
//emailInput.disabled = true; <script type="text/javascript">
//var emailInput = document.getElementById('email');
$(document).ready(function() { //emailInput.disabled = true;
$('#cpf').mask('000.000.000-00');
$('#celular').mask('(00) 00000-0000'); $(document).ready(function () {
}); $('#cpf').mask('000.000.000-00');
$('#celular').mask('(00) 00000-0000');
function limpa_formulário_cep() { });
//Limpa valores do formulário de cep.
document.getElementById('rua').value = (""); function limpa_formulário_cep() {
document.getElementById('bairro').value = (""); //Limpa valores do formulário de cep.
document.getElementById('cidade').value = (""); document.getElementById('rua').value = ("");
document.getElementById('uf').value = (""); document.getElementById('bairro').value = ("");
} document.getElementById('cidade').value = ("");
document.getElementById('uf').value = ("");
function meu_callback(conteudo) {
if (!("erro" in conteudo)) {
//Atualiza os campos com os valores.
document.getElementById('rua').value = (conteudo.logradouro);
document.getElementById('bairro').value = (conteudo.bairro);
document.getElementById('cidade').value = (conteudo.localidade);
document.getElementById('uf').value = (conteudo.uf);
} //end if.
else {
//CEP não Encontrado.
limpa_formulário_cep();
alert("CEP não encontrado.");
} }
}
function meu_callback(conteudo) {
function pesquisacep(valor) { if (!("erro" in conteudo)) {
//Nova variável "cep" somente com dígitos. //Atualiza os campos com os valores.
var cep = valor.replace(/\D/g, ''); document.getElementById('rua').value = (conteudo.logradouro);
//Verifica se campo cep possui valor informado. document.getElementById('bairro').value = (conteudo.bairro);
if (cep != "") { document.getElementById('cidade').value = (conteudo.localidade);
//Expressão regular para validar o CEP. document.getElementById('uf').value = (conteudo.uf);
var validacep = /^[0-9]{8}$/;
//Valida o formato do CEP.
if (validacep.test(cep)) {
//Preenche os campos com "..." enquanto consulta webservice.
document.getElementById('rua').value = "...";
document.getElementById('bairro').value = "...";
document.getElementById('cidade').value = "...";
document.getElementById('uf').value = "...";
//Cria um elemento javascript.
var script = document.createElement('script');
//Sincroniza com o callback.
script.src = 'https://viacep.com.br/ws/' + cep + '/json/?callback=meu_callback';
//Insere script no documento e carrega o conteúdo.
document.body.appendChild(script);
} //end if. } //end if.
else { else {
//cep é inválido. //CEP não Encontrado.
limpa_formulário_cep(); limpa_formulário_cep();
alert("Formato de CEP inválido."); alert("CEP não encontrado.");
} }
} //end if.
else {
//cep sem valor, limpa formulário.
limpa_formulário_cep();
} }
};
function mudar() { function pesquisacep(valor) {
var divProponente = document.getElementById('proponente'); //Nova variável "cep" somente com dígitos.
var comboBoxTipo = document.getElementById('tipo'); var cep = valor.replace(/\D/g, '');
//Verifica se campo cep possui valor informado.
if (cep != "") {
//Expressão regular para validar o CEP.
var validacep = /^[0-9]{8}$/;
//Valida o formato do CEP.
if (validacep.test(cep)) {
//Preenche os campos com "..." enquanto consulta webservice.
document.getElementById('rua').value = "...";
document.getElementById('bairro').value = "...";
document.getElementById('cidade').value = "...";
document.getElementById('uf').value = "...";
//Cria um elemento javascript.
var script = document.createElement('script');
//Sincroniza com o callback.
script.src = 'https://viacep.com.br/ws/' + cep + '/json/?callback=meu_callback';
//Insere script no documento e carrega o conteúdo.
document.body.appendChild(script);
} //end if.
else {
//cep é inválido.
limpa_formulário_cep();
alert("Formato de CEP inválido.");
}
} //end if.
else {
//cep sem valor, limpa formulário.
limpa_formulário_cep();
}
};
function mudar() {
var divProponente = document.getElementById('proponente');
var comboBoxTipo = document.getElementById('tipo');
if (comboBoxTipo.value == "proponente") { if (comboBoxTipo.value == "proponente") {
divProponente.style.display = "block"; divProponente.style.display = "block";
} else { } else {
divProponente.style.display = "none"; divProponente.style.display = "none";
}
} }
}
function outroVinculo() { function outroVinculo() {
var comboBoxVinculo = document.getElementById('vinculo'); var comboBoxVinculo = document.getElementById('vinculo');
var divOutro = document.getElementById('divOutro'); var divOutro = document.getElementById('divOutro');
if (comboBoxVinculo.value === "Outro") { if (comboBoxVinculo.value === "Outro") {
divOutro.style.display = "block"; divOutro.style.display = "block";
} else { } else {
divOutro.style.display = "none"; divOutro.style.display = "none";
}
} }
}
function mudarNivel() { function mudarNivel() {
var bolsista = document.getElementById('bolsistaProdutividade'); var bolsista = document.getElementById('bolsistaProdutividade');
var nivel = document.getElementById('nivelInput'); var nivel = document.getElementById('nivelInput');
if (bolsista.value === "sim") { if (bolsista.value === "sim") {
nivel.style.display = "block"; nivel.style.display = "block";
} else { } else {
nivel.style.display = "none"; nivel.style.display = "none";
}
} }
}
function showInstituicao() {
function showInstituicao() { var instituicao = document.getElementById('instituicao');
var instituicao = document.getElementById('instituicao'); var instituicaoSelect = document.getElementById('instituicaoSelect');
var instituicaoSelect = document.getElementById('instituicaoSelect'); var divOutroCurso = document.getElementById('divOutroCurso');
// if(instituicaoSelect.value === "Outra"){ if (instituicaoSelect.value === "Outra") {
// instituicaoSelect.style.display = "none"; document.getElementById("displayOutro").style.display = "block";
// instituicao.style.display = "inline"; divOutroCurso.style.display = "block";
// } instituicao.parentElement.style.display = '';
if (instituicaoSelect.value === "Outra") { document.getElementById('instituicao').value = "";
document.getElementById("displayOutro").style.display = "block"; } else if (instituicaoSelect.value === "UFAPE") {
instituicao.parentElement.style.display = ''; document.getElementById("displayOutro").style.display = "none";
} else if (instituicaoSelect.value === "UFAPE") { }
document.getElementById("displayOutro").style.display = "none";
if(instituicaoSelect.value != "Outra")
{
divOutroCurso.style.display = "none";
}
} }
}
function habilitando() {
function habilitando() { var checkbox = document.getElementById('alterarSenhaCheckBox');
var checkbox = document.getElementById('alterarSenhaCheckBox'); if (checkbox.checked) {
if (checkbox.checked) { document.getElementById('senha_atual').disabled = false;
document.getElementById('senha_atual').disabled = false; document.getElementById('nova_senha').disabled = false;
document.getElementById('nova_senha').disabled = false; document.getElementById('confirmar_senha').disabled = false;
document.getElementById('confirmar_senha').disabled = false; } else {
} else { document.getElementById('senha_atual').disabled = true;
document.getElementById('senha_atual').disabled = true; document.getElementById('nova_senha').disabled = true;
document.getElementById('nova_senha').disabled = true; document.getElementById('confirmar_senha').disabled = true;
document.getElementById('confirmar_senha').disabled = true; }
} }
}
function submeterForm() { function submeterForm() {
var form = document.getElementById('formEditUser'); var form = document.getElementById('formEditUser');
var emailInput = document.getElementById('email'); var emailInput = document.getElementById('email');
emailInput.disabled = false; emailInput.disabled = false;
form.submit(); form.submit();
} }
window.onload = showInstituicao(); window.onload = showInstituicao();
</script> </script>
@endsection @endsection
\ No newline at end of file
...@@ -212,6 +212,7 @@ Route::group(['middleware' => ['isTemp', 'auth', 'verified']], function () { ...@@ -212,6 +212,7 @@ Route::group(['middleware' => ['isTemp', 'auth', 'verified']], function () {
//########## Rotas de download de documentos ########################### //########## Rotas de download de documentos ###########################
Route::get('/baixar/anexo-projeto/{id}', 'TrabalhoController@baixarAnexoProjeto')->name('baixar.anexo.projeto'); Route::get('/baixar/anexo-projeto/{id}', 'TrabalhoController@baixarAnexoProjeto')->name('baixar.anexo.projeto');
Route::get('/baixar/anexo-consu/{id}', 'TrabalhoController@baixarAnexoConsu')->name('baixar.anexo.consu'); Route::get('/baixar/anexo-consu/{id}', 'TrabalhoController@baixarAnexoConsu')->name('baixar.anexo.consu');
Route::get('/baixar/anexo-acao-afirmativa/{id}', 'TrabalhoController@baixarAcaoAfirmativa')->name('baixar.anexo.acao.afirmativa');
Route::get('/baixar/anexo-comite/{id}', 'TrabalhoController@baixarAnexoComite')->name('baixar.anexo.comite'); Route::get('/baixar/anexo-comite/{id}', 'TrabalhoController@baixarAnexoComite')->name('baixar.anexo.comite');
Route::get('/baixar/anexo-justificativa/{id}', 'TrabalhoController@baixarAnexoJustificativa')->name('baixar.anexo.justificativa'); Route::get('/baixar/anexo-justificativa/{id}', 'TrabalhoController@baixarAnexoJustificativa')->name('baixar.anexo.justificativa');
Route::get('/baixar/anexo-lattes/{id}', 'TrabalhoController@baixarAnexoLattes')->name('baixar.anexo.lattes'); Route::get('/baixar/anexo-lattes/{id}', 'TrabalhoController@baixarAnexoLattes')->name('baixar.anexo.lattes');
......
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