Commit 6037d10b authored by José Rômulo's avatar José Rômulo
Browse files

Adicionando anexos complementares no form subs

parent 99a938d8
......@@ -269,6 +269,18 @@
$("#caracsRestantes"+idInput).html("Caracteres restantes: " + (maxlength - this.value.length));
}
});
$("input[type='file']").on("change", function () {
if(this.files[0].type.split('/')[1] == "pdf") {
if(this.files[0].size > 20000000){
alert("O arquivo possui o tamanho superior a 2MB!");
$(this).val('');
}
}else{
alert("O arquivo não é de tipo PDF!");
$(this).val('');
}
});
});
function manterPlano(checkBox){
......@@ -305,6 +317,7 @@
inputsForm.push(document.getElementById('rg'+idParticipante));
inputsForm.push(document.getElementById('cep'+idParticipante));
inputsForm.push(document.getElementById('celular'+idParticipante));
inputsForm.push(document.getElementById('linkLattes'+idParticipante));
inputsForm.push(document.getElementById('estado'+idParticipante));
inputsForm.push(document.getElementById('cidade'+idParticipante));
inputsForm.push(document.getElementById('bairro'+idParticipante));
......@@ -330,6 +343,9 @@
inputsForm.push(document.getElementById('ordem'+idParticipante));
inputsForm.push(document.getElementById('media'+idParticipante));
inputsForm.push(document.getElementById('anexoTermoCompromisso'+idParticipante));
inputsForm.push(document.getElementById('anexoComprovanteMatricula'+idParticipante));
if(checkboxInput.checked){
inputsForm.forEach(function(item,indice,array){
item.setAttribute('disabled', 'disabled');
......
......@@ -497,7 +497,42 @@
@endcomponent
</div>
<div class="col-12 mb-3">
<div class="col-md-12">
<h5>Documentação Complementar</h5>
</div>
<div class="col-6">
@component('componentes.input', ['label' => 'Termo de Compromisso (.pdf)'])
<input type="file" class="input-group-text" value="" name="anexoTermoCompromisso" accept=".pdf" placeholder="Anexo do Termo de Compromisso" id="anexoTermoCompromisso{{$participante->id}}" required />
@error('anexoTermoCompromisso')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
@endcomponent
</div>
<div class="col-6">
@component('componentes.input', ['label' => 'Comprovante de Matrícula (.pdf)'])
<input type="file" class="input-group-text" value="" name="anexoComprovanteMatricula" accept=".pdf" placeholder="Anexo do Comprovante de Matrícula" id="anexoComprovanteMatricula{{$participante->id}}" required />
@error('anexoComprovanteMatrícula')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
@endcomponent
</div>
<div class="col-6">
@component('componentes.input', ['label' => 'Currículo Lattes (.pdf)'])
<input type="file" class="input-group-text" value="" name="anexoCurriculoLattes" accept=".pdf" placeholder="Anexo do Currículo Lattes" id="anexoCurriculoLattes{{$participante->id}}" required />
@error('anexoCurriculoLattes')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
@endcomponent
</div>
<div class="col-12 mb-3 mt-3">
<div class="form-check">
<input class="form-check-input" type="checkbox" value="check" id="{{$participante->id}}" name="manterPlanoCheck" onchange="manterPlano(this)">
<label class="form-check-label" for="{{$participante->id}}">
......@@ -530,15 +565,10 @@
<strong>{{ $message }}</strong>
</span>
@enderror
@error('anexoPlanoTrabalho')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
@endcomponent
</div>
<div class="col-12">
<div class="col-12 mt-4">
<button type="submit" class="btn btn-success" id="idButtonSubmitParticipante">Salvar</button>
</div>
......
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