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
7edf98f9
Commit
7edf98f9
authored
May 08, 2023
by
Yuri Resende
Browse files
Exibindo mensagem quando o limite de integrantes for atingido
parent
64631712
Changes
2
Hide whitespace changes
Inline
Side-by-side
resources/views/evento/formulario/integrantes.blade.php
View file @
7edf98f9
...
...
@@ -109,6 +109,25 @@
</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-dialog"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
style=
"background-color: #dc3545;"
>
<h5
class=
"modal-title"
id=
"exampleModalLabel"
style=
"color: white;"
>
Aviso
</h5>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-label=
"Close"
>
<span
aria-hidden=
"true"
>
×
</span>
</button>
</div>
<div
class=
"modal-body"
>
<span
id=
"texto-erro"
>
O limite de integrantes para esse projeto foi atingido.
</span>
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-secondary btn-color-dafault"
data-dismiss=
"modal"
>
Ok
</button>
</div>
</div>
</div>
</div>
<script>
...
...
@@ -138,6 +157,12 @@
}
function
preencherUsuarioExistente
()
{
if
(
!
document
.
getElementById
(
`exampleModal
${
modal_id
}
`
)){
exibirModalNumeroMaximoDeIntegrantes
();
return
;
}
$
.
ajaxSetup
({
headers
:
{
'
X-CSRF-TOKEN
'
:
$
(
'
meta[name="csrf-token"]
'
).
attr
(
'
content
'
)
...
...
@@ -186,9 +211,14 @@
$
(
'
#aviso-modal-usuario-nao-existe
'
).
modal
(
'
show
'
);
}
function
exibirModalNumeroMaximoDeIntegrantes
()
{
$
(
'
#aviso-modal-limite-de-integrantes
'
).
modal
(
'
show
'
);
}
let
modal_id
=
0
;
function
exibirUsuarioAdicionado
(
data
)
{
console
.
log
(
`
${
modal_id
}
`
,
data
);
$
(
'
#modalIntegrante
'
).
modal
(
'
hide
'
);
document
.
getElementById
(
`nome
${
modal_id
}
`
).
value
=
data
[
0
][
'
name
'
];
document
.
getElementById
(
`nome
${
modal_id
}
`
).
setAttribute
(
"
readonly
"
,
""
);
...
...
resources/views/projeto/editaFormulario/integrantes.blade.php
View file @
7edf98f9
...
...
@@ -157,7 +157,7 @@
}
function
preencherUsuarioExistente
()
{
console
.
log
(
modal_id
);
//
console.log(modal_id);
if
(
!
document
.
getElementById
(
`exampleModal
${
modal_id
}
`
)){
exibirModalNumeroMaximoDeIntegrantes
();
return
;
...
...
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