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
c3a82172
Commit
c3a82172
authored
Jun 13, 2020
by
alinetenorio
Browse files
salvando quantidade de participantes se houver erro no cadastro
parent
beed2694
Changes
1
Show whitespace changes
Inline
Side-by-side
resources/views/evento/submeterTrabalho.blade.php
View file @
c3a82172
...
@@ -266,7 +266,8 @@
...
@@ -266,7 +266,8 @@
<div class="
row
" style="
margin
-
top
:
20
px
">
<div class="
row
" style="
margin
-
top
:
20
px
">
<div class="
col
-
sm
-
12
">
<div class="
col
-
sm
-
12
">
<div id="
participantes
">
<div id="
participantes
">
<div id="
novoParticipante
">
@if(old('divParticipante') == null)
<div id="
novoParticipante
" style="
display
:
block
;
">
<br>
<br>
<h5>Dados do participante</h5>
<h5>Dados do participante</h5>
@php
@php
...
@@ -350,7 +351,11 @@
...
@@ -350,7 +351,11 @@
</div>
</div>
</div>
</div>
</div>
</div>
@else
<div id="
novoParticipante
" style="
display
:
none
;
">
{
{old('divParticipante')}
}
</div>
@endif
</div>
</div>
<input type="
hidden
" name="
divParticipante
" id="
divParticipante
" value="
{{
old
(
'divParticipante'
)}}
"></input>
<a href="
#" class="btn btn-primary" id="addCoautor" style="width:100%;margin-top:10px">Participantes +</a>
<a href="
#" class="btn btn-primary" id="addCoautor" style="width:100%;margin-top:10px">Participantes +</a>
</
div
>
</
div
>
</
div
>
</
div
>
...
@@ -361,7 +366,7 @@
...
@@ -361,7 +366,7 @@
<
a
href
=
"
{
{route('evento.visualizar',['id'=>$edital->id])}
}
"
class
=
"btn btn-secondary"
style
=
"width:100%"
>
Cancelar
</
a
>
<
a
href
=
"
{
{route('evento.visualizar',['id'=>$edital->id])}
}
"
class
=
"btn btn-secondary"
style
=
"width:100%"
>
Cancelar
</
a
>
</
div
>
</
div
>
<
div
class
=
"col-md-6"
>
<
div
class
=
"col-md-6"
>
<
button
type
=
"submit"
class
=
"btn btn-primary"
style
=
"width:100%"
>
<
button
type
=
"submit"
class
=
"btn btn-primary"
style
=
"width:100%"
onclick
=
"setParticipanteDiv()"
>
{{
__
(
'Enviar'
)
}}
{{
__
(
'Enviar'
)
}}
</
button
>
</
button
>
</
div
>
</
div
>
...
@@ -386,10 +391,42 @@
...
@@ -386,10 +391,42 @@
e
.
preventDefault
();
e
.
preventDefault
();
linha
=
montarLinhaInput
();
linha
=
montarLinhaInput
();
$
(
'#participantes'
)
.
append
(
linha
);
$
(
'#participantes'
)
.
append
(
linha
);
qtdParticipantes
++
qtdParticipantes
++
;
setParticipanteDiv
();
}
}
});
});
function
setParticipanteDiv
(){
var
participantes
=
document
.
getElementById
(
'participantes'
);
var
novoParticipante
=
document
.
getElementById
(
'novoParticipante'
);
var
divParticipante
=
document
.
getElementById
(
'divParticipante'
);
//console.log(participantes.innerHTML);
if
(
novoParticipante
.
style
.
display
==
'block'
){
console
.
log
(
'block'
);
divParticipante
.
value
=
participantes
.
innerHTML
;
}
else
{
console
.
log
(
'none'
);
participantes
.
innerHTML
=
divParticipante
.
value
;
}
}
function
getParticipanteDiv
(){
var
oldNovoParticipante
=
document
.
getElementById
(
'oldNovoParticipante'
);
var
participantes
=
document
.
getElementById
(
'participantes'
);
var
divParticipante
=
document
.
getElementById
(
'divParticipante'
);
// console.log(participantes.innerHTML);
if
(
novoParticipante
.
style
.
display
==
'none'
){
console
.
log
(
'none'
);
participantes
.
innerHTML
=
divParticipante
.
value
;
}
else
{
console
.
log
(
'block'
);
}
}
//window.onload = setParticipanteDiv();
window
.
onload
=
getParticipanteDiv
();
$
(
'#addPlanoTrabalho'
)
.
click
(
function
(
e
)
{
$
(
'#addPlanoTrabalho'
)
.
click
(
function
(
e
)
{
e
.
preventDefault
();
e
.
preventDefault
();
if
(
qtdLinhas
<
4
)
{
if
(
qtdLinhas
<
4
)
{
...
...
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