Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
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
2 years ago
by
Yuri Resende
Browse files
Options
Download
Email Patches
Plain Diff
Exibindo mensagem quando o limite de integrantes for atingido
parent
64631712
master
carl-branch
excluir_projeto_submetido
updates_mar
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
resources/views/evento/formulario/integrantes.blade.php
+30
-0
resources/views/evento/formulario/integrantes.blade.php
resources/views/projeto/editaFormulario/integrantes.blade.php
+1
-1
...urces/views/projeto/editaFormulario/integrantes.blade.php
with
31 additions
and
1 deletion
+31
-1
resources/views/evento/formulario/integrantes.blade.php
View file @
7edf98f9
...
@@ -109,6 +109,25 @@
...
@@ -109,6 +109,25 @@
</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-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>
<script>
...
@@ -138,6 +157,12 @@
...
@@ -138,6 +157,12 @@
}
}
function
preencherUsuarioExistente
()
{
function
preencherUsuarioExistente
()
{
if
(
!
document
.
getElementById
(
`exampleModal
${
modal_id
}
`
)){
exibirModalNumeroMaximoDeIntegrantes
();
return
;
}
$
.
ajaxSetup
({
$
.
ajaxSetup
({
headers
:
{
headers
:
{
'
X-CSRF-TOKEN
'
:
$
(
'
meta[name="csrf-token"]
'
).
attr
(
'
content
'
)
'
X-CSRF-TOKEN
'
:
$
(
'
meta[name="csrf-token"]
'
).
attr
(
'
content
'
)
...
@@ -186,9 +211,14 @@
...
@@ -186,9 +211,14 @@
$
(
'
#aviso-modal-usuario-nao-existe
'
).
modal
(
'
show
'
);
$
(
'
#aviso-modal-usuario-nao-existe
'
).
modal
(
'
show
'
);
}
}
function
exibirModalNumeroMaximoDeIntegrantes
()
{
$
(
'
#aviso-modal-limite-de-integrantes
'
).
modal
(
'
show
'
);
}
let
modal_id
=
0
;
let
modal_id
=
0
;
function
exibirUsuarioAdicionado
(
data
)
{
function
exibirUsuarioAdicionado
(
data
)
{
console
.
log
(
`
${
modal_id
}
`
,
data
);
$
(
'
#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
"
,
""
);
...
...
This diff is collapsed.
Click to expand it.
resources/views/projeto/editaFormulario/integrantes.blade.php
View file @
7edf98f9
...
@@ -157,7 +157,7 @@
...
@@ -157,7 +157,7 @@
}
}
function
preencherUsuarioExistente
()
{
function
preencherUsuarioExistente
()
{
console
.
log
(
modal_id
);
//
console.log(modal_id);
if
(
!
document
.
getElementById
(
`exampleModal
${
modal_id
}
`
)){
if
(
!
document
.
getElementById
(
`exampleModal
${
modal_id
}
`
)){
exibirModalNumeroMaximoDeIntegrantes
();
exibirModalNumeroMaximoDeIntegrantes
();
return
;
return
;
...
...
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
Menu
Projects
Groups
Snippets
Help