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
852fe4ff
Unverified
Commit
852fe4ff
authored
2 years ago
by
Edgar Vinicius Carvalho Vital
Committed by
GitHub
2 years ago
Browse files
Options
Download
Plain Diff
Merge pull request #844 from Edgarvital/ajuste_js_integrantes
Revert no commit
parents
2b7850ea
236ee5f8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
database/seeders/UsuarioSeeder.php
+0
-1
database/seeders/UsuarioSeeder.php
resources/views/evento/formulario/integrantes.blade.php
+90
-104
resources/views/evento/formulario/integrantes.blade.php
with
90 additions
and
105 deletions
+90
-105
database/seeders/UsuarioSeeder.php
View file @
852fe4ff
...
@@ -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'
),
...
...
This diff is collapsed.
Click to expand it.
resources/views/evento/formulario/integrantes.blade.php
View file @
852fe4ff
<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"
>
×
</span>
<span
aria-hidden=
"true"
>
×
</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"
>
...
@@ -56,14 +58,16 @@
...
@@ -56,14 +58,16 @@
@elseif($funcao->nome != "Consultor"
&&
$funcao->nome != "Pesquisador"
&&
$funcao->nome != "Voluntário")
@elseif($funcao->nome != "Consultor"
&&
$funcao->nome != "Pesquisador"
&&
$funcao->nome != "Voluntário")
<option
value=
"{{$funcao->id}}"
>
{{ $funcao->nome }}
</option>
<option
value=
"{{$funcao->id}}"
>
{{ $funcao->nome }}
</option>
@endif
@endif
@else
@else
<option
value=
"{{$funcao->id}}"
>
{{ $funcao->nome }}
</option>
<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 +79,15 @@
...
@@ -75,14 +79,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"
>
×
</span>
<span
aria-hidden=
"true"
>
×
</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 +99,15 @@
...
@@ -94,14 +99,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"
>
×
</span>
<span
aria-hidden=
"true"
>
×
</span>
</button>
</button>
</div>
</div>
<div
class=
"modal-body"
>
<div
class=
"modal-body"
>
Integrante adicionado com sucesso
Integrante adicionado com sucesso
...
@@ -113,16 +119,17 @@
...
@@ -113,16 +119,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"
>
×
</span>
<span
aria-hidden=
"true"
>
×
</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 +140,6 @@
...
@@ -133,7 +140,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 +150,7 @@
...
@@ -144,7 +150,7 @@
}
}
function
preencherUsuarioExistente
()
{
function
preencherUsuarioExistente
()
{
if
(
!
document
.
getElementById
(
`exampleModal
${
modal_id
}
`
)){
if
(
!
document
.
getElementById
(
`exampleModal
${
modal_id
}
`
))
{
exibirModalNumeroMaximoDeIntegrantes
();
exibirModalNumeroMaximoDeIntegrantes
();
return
;
return
;
}
}
...
@@ -155,29 +161,29 @@
...
@@ -155,29 +161,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
(
$
(
'
#funcao_participante
'
).
val
()
!=
4
||
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
();
}
}
}
}
}
}
});
});
}
}
...
@@ -194,96 +200,76 @@
...
@@ -194,96 +200,76 @@
function
exibirUsuarioAdicionado
(
data
)
{
function
exibirUsuarioAdicionado
(
data
)
{
console
.
log
(
data
[
0
])
console
.
log
(
data
[
0
])
$
(
'
#modalIntegrante
'
).
modal
(
'
hide
'
);
$
(
'
#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
"
,
""
);
if
(
data
[
0
][
'
tipo
'
]
==
"
participante
"
){
if
(
data
[
0
][
'
tipo
'
]
==
"
participante
"
)
{
let
[
y
,
m
,
d
]
=
data
[
2
][
'
data_de_nascimento
'
].
split
(
'
-
'
);
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
}
`
).
value
=
(
new
Date
(
y
,
m
-
1
,
d
)).
toLocaleDateString
();
document
.
getElementById
(
`data_de_nascimento
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
document
.
getElementById
(
`data_de_nascimento
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
}
else
{
}
else
{
document
.
getElementById
(
`data_de_nascimento
${
modal_id
}
`
).
value
=
null
;
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
}
`
).
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
}
`
).
value
=
data
[
2
][
'
rg
'
];
document
.
getElementById
(
`rg
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
document
.
getElementById
(
`rg
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
document
.
getElementById
(
`celular
${
modal_id
}
`
).
value
=
data
[
0
][
'
celular
'
];
document
.
getElementById
(
`celular
${
modal_id
}
`
).
value
=
data
[
0
][
'
celular
'
];
document
.
getElementById
(
`celular
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
document
.
getElementById
(
`celular
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
if
(
data
?.[
3
]?.
cep
)
{
document
.
getElementById
(
`cep
${
modal_id
}
`
).
value
=
data
[
3
].
cep
;
document
.
getElementById
(
`cep
${
modal_id
}
`
).
value
=
data
[
3
].
cep
;
document
.
getElementById
(
`cep
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
document
.
getElementById
(
`cep
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
}
if
(
data
?.[
3
]?.
cep
)
{
document
.
getElementById
(
`cep
${
modal_id
}
`
).
value
=
data
[
3
].
cep
;
document
.
getElementById
(
`cep
${
modal_id
}
`
).
value
=
data
[
3
].
cep
;
document
.
getElementById
(
`cep
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
document
.
getElementById
(
`cep
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
}
if
(
data
?.[
3
]?.
uf
)
{
document
.
getElementById
(
`uf
${
modal_id
}
`
).
value
=
data
[
3
].
uf
;
document
.
getElementById
(
`uf
${
modal_id
}
`
).
value
=
data
[
3
].
uf
;
document
.
getElementById
(
`uf
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
document
.
getElementById
(
`uf
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
}
if
(
data
?.[
3
]?.
cidade
)
{
document
.
getElementById
(
`cidade
${
modal_id
}
`
).
value
=
data
[
3
].
cidade
;
document
.
getElementById
(
`cidade
${
modal_id
}
`
).
value
=
data
[
3
].
cidade
;
document
.
getElementById
(
`cidade
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
document
.
getElementById
(
`cidade
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
}
if
(
data
?.[
3
]?.
bairro
)
{
document
.
getElementById
(
`bairro
${
modal_id
}
`
).
value
=
data
[
3
].
bairro
;
document
.
getElementById
(
`bairro
${
modal_id
}
`
).
value
=
data
[
3
].
bairro
;
document
.
getElementById
(
`bairro
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
document
.
getElementById
(
`bairro
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
}
if
(
data
?.[
3
]?.
rua
)
{
document
.
getElementById
(
`rua
${
modal_id
}
`
).
value
=
data
[
3
].
rua
;
document
.
getElementById
(
`rua
${
modal_id
}
`
).
value
=
data
[
3
].
rua
;
document
.
getElementById
(
`rua
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
document
.
getElementById
(
`rua
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
}
if
(
data
?.[
3
]?.
numero
)
{
document
.
getElementById
(
`numero
${
modal_id
}
`
).
value
=
data
[
3
].
numero
;
document
.
getElementById
(
`numero
${
modal_id
}
`
).
value
=
data
[
3
].
numero
;
document
.
getElementById
(
`numero
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
document
.
getElementById
(
`numero
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
}
if
(
data
?.[
3
]?.
complemento
)
{
document
.
getElementById
(
`complemento
${
modal_id
}
`
).
value
=
data
[
3
].
complemento
;
document
.
getElementById
(
`complemento
${
modal_id
}
`
).
value
=
data
[
3
].
complemento
;
document
.
getElementById
(
`complemento
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
document
.
getElementById
(
`complemento
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
}
if
(
data
?.[
0
]?.
instituicao
)
{
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
"
,
""
);
}
if
(
data
?.[
2
]?.
curso
)
{
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
"
)
{
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
'
);
}
}
...
...
This diff is collapsed.
Click to expand it.
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