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
82127cad
Commit
82127cad
authored
Dec 22, 2022
by
Lucas Henrique
Browse files
Verificação do valor total das notas máximas
parent
1cbcfa12
Changes
1
Show whitespace changes
Inline
Side-by-side
resources/views/evento/criarEvento.blade.php
View file @
82127cad
...
@@ -478,11 +478,14 @@
...
@@ -478,11 +478,14 @@
<
td
><
button
type
=
"button"
name
=
"add"
id
=
"dynamic-ar"
class
=
"btn btn-outline-primary"
>
Adicionar
</
button
></
td
>
<
td
><
button
type
=
"button"
name
=
"add"
id
=
"dynamic-ar"
class
=
"btn btn-outline-primary"
>
Adicionar
</
button
></
td
>
</
tr
>
</
tr
>
</
table
>
</
table
>
<
div
class
=
"col-sm-12 alert alert-danger"
style
=
"display: none"
id
=
"nota_maxima_invalida"
>
A
soma
das
notas
máximas
não
pode
ser
maior
que
10.
</
div
>
</
div
>
</
div
>
<
div
class
=
"row"
style
=
"margin-top:10px; display: none"
id
=
"displayLink"
>
<
div
class
=
"
col-sm-12
row"
style
=
"margin-top:10px; display: none"
id
=
"displayLink"
>
<
label
for
=
"link"
class
=
"col-form-label"
>
{{
__
(
'Link para o formulário:'
)
}}
<
span
style
=
"color:red; font-weight:bold;"
>*</
span
></
label
>
<
label
for
=
"link"
class
=
"col-form-label"
>
{{
__
(
'Link para o formulário:'
)
}}
<
span
style
=
"color:red; font-weight:bold;"
>*</
span
></
label
>
<
input
id
=
"link"
type
=
"text"
class
=
"form-control @error('link') is-invalid @enderror"
name
=
"link"
value
=
"{{ old('link') }}"
required
autocomplete
=
"link"
autofocus
>
<
input
id
=
"link"
type
=
"text"
class
=
"form-control @error('link') is-invalid @enderror"
name
=
"link"
value
=
"{{ old('link') }}"
required
autocomplete
=
"link"
>
</
div
>
</
div
>
<
hr
>
<
hr
>
...
@@ -630,6 +633,27 @@
...
@@ -630,6 +633,27 @@
});
});
$
(
"#dynamicAddRemove"
)
.
on
(
'input'
,
'.nota_maxima'
,
function
()
{
console
.
log
(
"eita"
)
somaNotas
=
0
;
$
(
".nota_maxima"
)
.
each
(
function
()
{
valor
=
Number
(
$
(
this
)
.
val
());
if
(
valor
!=
0
)
{
somaNotas
+=
valor
;
}
});
if
(
somaNotas
>
10
)
{
$
(
'.nota_maxima'
)
.
css
(
'border'
,
'1px solid red'
);
document
.
getElementById
(
"nota_maxima_invalida"
)
.
style
.
display
=
""
;
}
else
{
$
(
'.nota_maxima'
)
.
css
(
'border'
,
''
);
document
.
getElementById
(
"nota_maxima_invalida"
)
.
style
.
display
=
"none"
;
}
});
// Tipo de avaliação
// Tipo de avaliação
function
displayTipoAvaliacao
(
valor
){
function
displayTipoAvaliacao
(
valor
){
...
...
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