Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Walter Felipe
submeta
Commits
99b9bf57
Commit
99b9bf57
authored
Jun 14, 2020
by
alinetenorio
Browse files
delete de participante após erro de validação
parent
f37bbaf2
Changes
1
Show whitespace changes
Inline
Side-by-side
resources/views/evento/submeterTrabalho.blade.php
View file @
99b9bf57
...
...
@@ -2,7 +2,6 @@
@
section
(
'content'
)
<
div
class
=
"container content"
>
<
div
class
=
"row justify-content-center"
>
<
div
class
=
"col-sm-12"
>
<
div
class
=
"card"
style
=
"margin-top:50px"
>
...
...
@@ -76,14 +75,6 @@
</div>
</div>
<hr>
<h3>Coordenador</h3>
...
...
@@ -96,8 +87,7 @@
</div>
<div class="
col
-
sm
-
6
">
<label for="
linkLattesEstudante
" class="
col
-
form
-
label
">Link Lattes do Proponente*</label>
<input class="
form
-
control
@
error
(
'linkLattesEstudante'
)
is
-
invalid
@
enderror
" type="
text
" name="
linkLattesEstudante
"
@if(Auth()->user()->proponentes->linkLattes != null)
<input class="
form
-
control
@
error
(
'linkLattesEstudante'
)
is
-
invalid
@
enderror
" type="
text
" name="
linkLattesEstudante
" @if(Auth()->user()->proponentes->linkLattes != null)
value="
{{
Auth
()
->
user
()
->
proponentes
->
linkLattes
}}
"
@else
value=""
...
...
@@ -172,10 +162,6 @@
@enderror
</div>
<div class="
col
-
sm
-
6
">
<label for="
botao
" class="
col
-
form
-
label
@
error
(
'botao'
)
is
-
invalid
@
enderror
">{{ __('Possui autorização do Comitê de Ética*:') }}</label>
<button id="
buttonSim
" class="
btn
btn
-
primary
mt
-
2
mb
-
2
">Sim</button>
...
...
@@ -271,11 +257,9 @@
@if(old('countParticipante') != null)
@php
$countParticipante
= old('countParticipante') @endphp
@endif
{
{$countParticipante}
}
@if (
$countParticipante
!= null &&
$countParticipante
> 0)
@for (
$i
= 0;
$i
<
$countParticipante
;
$i
++)
<div id="
novoParticipante
" style="
display
:
block
;
">
@for (
$i
= 0;
$i
<
$countParticipante
;
$i
++) <div id="
novoParticipante
" style="
display
:
block
;
">
<br>
<h5>Dados do participante</h5>
<div class="
row
">
...
...
@@ -380,7 +364,6 @@
</
div
>
</
div
>
</
div
>
</
div
>
@
endsection
...
...
@@ -388,20 +371,18 @@
<
script
type
=
"text/javascript"
>
$
(
function
()
{
var
qtdLinhas
=
1
;
var
qtdParticipantes
=
2
;
// Coautores
$
(
'#addCoautor'
)
.
click
(
function
(
e
)
{
if
(
qtdParticipantes
<
100
)
{
var
countParticipante
=
document
.
getElementById
(
'countParticipante'
);
if
(
countParticipante
.
value
<
100
)
{
e
.
preventDefault
();
linha
=
montarLinhaInput
();
$
(
'#participantes'
)
.
append
(
linha
);
setParticipanteDiv
(
qtdParticipantes
);
qtdParticipantes
++
;
setParticipanteDiv
(
parseInt
(
countParticipante
.
value
)
+
1
);
}
});
function
setParticipanteDiv
(
qtdParticipante
){
function
setParticipanteDiv
(
qtdParticipante
)
{
var
countParticipante
=
document
.
getElementById
(
'countParticipante'
);
countParticipante
.
value
=
qtdParticipante
;
}
...
...
@@ -413,7 +394,6 @@
$
(
'#planoTrabalho'
)
.
append
(
linha
);
qtdLinhas
++
;
}
});
// // Exibir modalidade de acordo com a área
// $("#area").change(function() {
...
...
@@ -421,9 +401,9 @@
// addModalidade($(this).val());
// });
$
(
document
)
.
on
(
'click'
,
'.delete'
,
function
()
{
if
(
qtd
Participante
s
>
2
)
{
qtd
Participante
s
--
;
setParticipanteDiv
(
qtd
Participante
s
-
1
);
var
count
Participante
=
document
.
getElementById
(
'countParticipante'
);
if
(
count
Participante
.
value
>=
2
)
{
setParticipanteDiv
(
parseInt
(
count
Participante
.
value
)
-
1
);
$
(
this
)
.
closest
(
'#novoParticipante'
)
.
remove
();
return
false
;
}
...
...
@@ -462,17 +442,17 @@
});
});
function
exibirErro
(
campo
){
function
exibirErro
(
campo
)
{
console
.
log
(
"o campo "
+
campo
);
var
botao
=
document
.
getElementById
(
'botao'
);
botao
.
value
=
"sim"
;
var
comiteErro
=
document
.
getElementById
(
'comiteErro'
);
var
justificativaErro
=
document
.
getElementById
(
'justificativaErro'
);
if
(
campo
===
'comite'
){
if
(
campo
===
'comite'
)
{
comiteErro
.
style
.
display
=
"block"
;
justificativaErro
.
style
.
display
=
"none"
;
}
else
if
(
campo
===
'justificativa'
){
}
else
if
(
campo
===
'justificativa'
)
{
comiteErro
.
style
.
display
=
"none"
;
justificativaErro
.
style
.
display
=
"block"
;
}
...
...
@@ -566,6 +546,7 @@
"</div>"
+
"</div>"
;
}
// function montarLinhaInputPlanoTrabalho(){
// return "<div class="+"row"+">"+
...
...
@@ -603,11 +584,11 @@
function
areas
()
{
var
grandeArea
=
$
(
'#grandeArea'
)
.
val
();
$
.
getJSON
(
"{{ config('app.url') }}/naturezas/areas/"
+
grandeArea
,
function
(
dados
){
if
(
dados
.
length
>
0
)
{
function
(
dados
)
{
if
(
dados
.
length
>
0
)
{
var
option
=
'<option>-- Área --</option>'
;
$
.
each
(
dados
,
function
(
i
,
obj
){
option
+=
'<option value="'
+
obj
.
id
+
'">'
+
obj
.
nome
+
'</option>'
;
$
.
each
(
dados
,
function
(
i
,
obj
)
{
option
+=
'<option value="'
+
obj
.
id
+
'">'
+
obj
.
nome
+
'</option>'
;
})
}
else
{
var
option
=
"<option>-- Área --</option>"
;
...
...
@@ -619,11 +600,11 @@
function
subareas
()
{
var
area
=
$
(
'#area'
)
.
val
();
$
.
getJSON
(
"{{ config('app.url') }}/naturezas/subarea/"
+
area
,
function
(
dados
){
if
(
dados
.
length
>
0
)
{
function
(
dados
)
{
if
(
dados
.
length
>
0
)
{
var
option
=
'<option>-- Sub Área --</option>'
;
$
.
each
(
dados
,
function
(
i
,
obj
){
option
+=
'<option value="'
+
obj
.
id
+
'">'
+
obj
.
nome
+
'</option>'
;
$
.
each
(
dados
,
function
(
i
,
obj
)
{
option
+=
'<option value="'
+
obj
.
id
+
'">'
+
obj
.
nome
+
'</option>'
;
})
}
else
{
var
option
=
"<option>-- Sub Área --</option>"
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment