@foreach ($arquivos as $arquivo)
@if($arquivo->participanteId === $participante->id)
Dados do plano de trabalho
-
Plano de trabalho atual
+
Plano de trabalho atual
@@ -344,7 +344,7 @@
-
+
@error('nomePlanoTrabalho')
{{ $message }}
@@ -385,7 +385,7 @@
@endif
@endforeach
@endforeach
-
+
Participantes +
@@ -429,7 +429,7 @@
}
});
-
+
// $('#addPlanoTrabalho').click(function(e) {
// e.preventDefault();
// if (qtdLinhas < 4) {
@@ -465,7 +465,7 @@
//replace the "Choose a file" label
$(this).next('#custom-file-label').html(fileName);
})
-
+
$('#buttonSim').on('click', function(e) {
e.preventDefault();
$('#inputEtica').prop('disabled', false);
@@ -474,52 +474,30 @@
$('#buttonNao').on('click', function(e) {
e.preventDefault();
$('#inputEtica').prop('disabled', true);
- $('#inputJustificativa').prop('disabled', false);
+ $('#inputJustificativa').prop('disabled', false);
});
- // Habilitando / desabilitando plano de trabalho
- $('.simPlano').click(function(e) {
- e.preventDefault();
- var possuiPlano = $(this).parent().parent().next();
-
- //se o participante não tem plano, adicionar; se ele já tem, apenas exibir
- if(possuiPlano[0].firstElementChild == null){
- linha = linhaPlanoTrabalho();
- possuiPlano.append(linha);
- possuiPlano[0].style.display = 'block';
- }else if(possuiPlano[0].firstElementChild.className == 'exibirPlano'){
- possuiPlano[0].style.display = 'block';
- }
-
- //esconder a imagem de deletar
- deletar = $(this).parent().next()[0];
- deletar.style.display = "none";
-
+ // Habilitando / desabilitando plano de trabalho
+ $(document).on('click', '.simPlano', function(e) {
+ e.preventDefault();
+ var plano = $(this).next().next()[0];
+ plano.style.display = 'block';
});
-
- // se não há plano de trabalho, esconder a div planoHabilitado e exibir imagem de deletar
$(document).on('click', '.naoPlano', function(e) {
e.preventDefault();
- var plano = $(this).parent().parent().next()[0];
- plano.style.display = 'none';
-
- deletar = $(this).parent().next()[0]
- deletar.style.display = "block";
-
- //comunicar ao controller para deletar somente o plano
- $(this).next().val('sim');
-
+ var plano = $(this).next()[0];
+ plano.style.display = 'none';
});
-
+
//se há plano de trabalho, esconder a imagem de deletar
- $(function() {
+ $(function() {
var simPlano = document.getElementsByClassName('simPlano');
for(var i=0; i< simPlano.length;i++){
- var planoHabilitado = simPlano[i].parentElement.parentElement.nextElementSibling;
+ var planoHabilitado = simPlano[i].parentElement.parentElement.nextElementSibling;
if(planoHabilitado.firstElementChild != null && planoHabilitado.firstElementChild.className == 'exibirPlano'){
- simPlano[i].parentElement.nextElementSibling.style.display = "none";
- }
- }
+ simPlano[i].parentElement.nextElementSibling.style.display = "none";
+ }
+ }
});
});
// Remover Coautor
@@ -537,47 +515,58 @@
function montarLinhaInput() {
- return "
" +
+ return "
" +
+ "
"+
+ "
"+
"
Dados do participante
" +
- "
"+
- "
"+
- ""+
- ""+
- "@error('nomeParticipante')" +
- "" +
- "{{ $message }}" +
- "" +
- "@enderror" +
- "
"+
- "
"+
- ""+
- "" +
- "@error('emailParticipante')" +
- "" +
- "{{ $message }}" +
- "" +
- "@enderror" +
- "
"+
- "
"+
- ""+
- ""+
- "
"+
- "
" +
+ "
"+
+ "
"+
+
+ "
"+
+ "
"+
+ "
"+
+ "
"+
+ ""+
+ ""+
+ "@error('nomeParticipante')" +
+ "" +
+ "{{ $message }}" +
+ "" +
+ "@enderror" +
+ "
"+
+ "
"+
+ ""+
+ "" +
+ "@error('emailParticipante')" +
+ "" +
+ "{{ $message }}" +
+ "" +
+ "@enderror" +
+ "
"+
+ "
"+
+ ""+
+ ""+
+ "
"+
+ "
" +
+ "
Possui plano de trabalho?
"+
+ "
"+
+ "
"+
+ "
" +
"
Dados do plano de trabalho
" +
"
"+
"
"+
- ""+
- ""+
+ ""+
+ ""+
"@error('nomePlanoTrabalho')" +
"" +
"{{ $message }}" +
@@ -585,17 +574,17 @@
"@enderror" +
"
"+
"
"+
- "
"+
+ "
"+
"
"+
"
"+
"@error('anexoPlanoTrabalho')"+
"
"+
@@ -605,10 +594,13 @@
""+
"
"+
"
"+
+ "
"+
+
+ "
Remover participante"+
"
";
}
// function montarLinhaInputPlanoTrabalho(){
@@ -636,7 +628,7 @@
// "
{{ $message }}"+
// ""+
// "@enderror"+
- // "