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
037d2797
"resources/views/vscode:/vscode.git/clone" did not exist on "34234cdf6f6f38ce251a1b54bfb8c4109e2ac439"
Commit
037d2797
authored
Oct 13, 2021
by
Guilherme Silva
Browse files
Validação no recebimento de arquivo ao criar edital
parent
8bb7c2c0
Changes
1
Show whitespace changes
Inline
Side-by-side
resources/views/evento/criarEvento.blade.php
View file @
037d2797
...
...
@@ -236,7 +236,7 @@
<a id="
pdfEditalTemp
" href="
{{
route
(
'baixar.evento.temp'
,
[
'nomeAnexo'
=>
'pdfEdital'
])}}
">Arquivo atual</a>
@endif
<input type="
hidden
" id="
pdfEditalPreenchido
" name="
pdfEditalPreenchido
" value="
{{
old
(
'pdfEditalPreenchido'
)
}}
" >
<input type="
file
" class="
form
-
control
-
file
@
error
(
'pdfEdital'
)
is
-
invalid
@
enderror
" name="
pdfEdital
" value="
{{
old
(
'pdfEdital'
)
}}
" id="
pdfEdital
" onchange="
exibirAnexoTemp
(
this
)
">
<input type="
file
"
accept="
.
pdf
"
class="
form
-
control
-
file
pdf
@
error
(
'pdfEdital'
)
is
-
invalid
@
enderror
" name="
pdfEdital
" value="
{{
old
(
'pdfEdital'
)
}}
" id="
pdfEdital
" onchange="
exibirAnexoTemp
(
this
)
">
<small>O arquivo selecionado deve ser no formato PDF de até 2mb.</small>
@error('pdfEdital')
<span class="
invalid
-
feedback
" role="
alert
">
...
...
@@ -293,5 +293,26 @@
modeloDocumentoPreenchido.value = "
sim
";
}
}
$("
input
[
type
=
'file'
]
").on("
change
", function () {
if(this.files[0].size > 2000000) {
// console.log($(this).parents( "
.
col
-
sm
-
5
" ))
alert("
O
tamanho
do
arquivo
deve
ser
menor
que
2
MB
!
");
$(this).val('');
}
});
$("
input
.
pdf
").on("
change
", function () {
if(this.files[0].type.split('/')[1] == "
pdf
") {
if(this.files[0].size > 20000000){
alert("
O
arquivo
possui
o
tamanho
superior
a
2
MB
!
");
$(this).val('');
}
}else{
alert("
O
arquivo
não
é
de
tipo
PDF
!
");
$(this).val('');
}
});
</script>
@endsection
\ No newline at end of file
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