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
c626bb5e
Commit
c626bb5e
authored
Jun 09, 2020
by
Gabriel-31415
Browse files
atualizar o caminho do input file
parent
7b97025b
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/TrabalhoController.php
View file @
c626bb5e
...
...
@@ -104,7 +104,8 @@ class TrabalhoController extends Controller
'funcaoParticipante.*'
=>
[
'required'
,
'string'
],
'nomePlanoTrabalho.*'
=>
[
'required'
,
'string'
],
'anexoProjeto'
=>
[
'required'
,
'file'
,
'mimes:pdf'
,
'max:2000000'
],
//'anexoCONSU' => ['required', 'file', 'mimes:pdf', 'max:2000000'],
'anexoCONSU'
=>
[
'required'
,
'file'
,
'mimes:pdf'
,
'max:2000000'
],
'anexoComiteEtica'
=>
[
'required'
,
'file'
,
'mimes:pdf'
,
'max:2000000'
],
'anexoLatterCoordenador'
=>
[
'required'
,
'file'
,
'mimes:pdf'
,
'max:2000000'
],
'anexoPlanilha'
=>
[
'required'
,
'file'
,
'mimes:pdf'
,
'max:2000000'
],
'anexoPlanoTrabalho.*'
=>
[
'required'
,
'file'
,
'mimes:pdf'
,
'max:2000000'
],
...
...
@@ -125,7 +126,7 @@ class TrabalhoController extends Controller
'avaliado'
=>
0
,
'proponente_id'
=>
$proponente
->
id
,
//Anexos
'anexo
DecisaoCONSU'
=>
$request
->
anexoCONSU
,
'anexo
CONSU'
=>
$request
->
anexoCONSU
,
'anexoProjeto'
=>
$request
->
anexoProjeto
,
'anexoAutorizacaoComiteEtica'
=>
$request
->
anexoComiteEtica
,
'justificativaAutorizacaoEtica'
=>
$request
->
justificativaAutorizacaoEtica
,
...
...
resources/views/evento/submeterTrabalho.blade.php
View file @
c626bb5e
...
...
@@ -16,10 +16,10 @@
{{
--
Nome
do
Projeto
--
}}
<
div
class
=
"row justify-content-center"
>
<
div
class
=
"col-sm-12"
>
<
label
for
=
"nome
Trabalh
o"
class
=
"col-form-label"
>
{{
__
(
'Nome do Projeto:'
)
}}
</
label
>
<
input
id
=
"nome
Trabalh
o"
type
=
"text"
class
=
"form-control @error('nome
Trabalh
o') is-invalid @enderror"
name
=
"nomeProjeto"
value
=
"{{ old('nome
Trabalh
o') }}"
required
autocomplete
=
"nome
Trabalh
o"
autofocus
>
<
label
for
=
"nome
Projet
o"
class
=
"col-form-label"
>
{{
__
(
'Nome do Projeto:'
)
}}
</
label
>
<
input
id
=
"nome
Projet
o"
type
=
"text"
class
=
"form-control @error('nome
Projet
o') is-invalid @enderror"
name
=
"nomeProjeto"
value
=
"{{ old('nome
Projet
o') }}"
required
autocomplete
=
"nome
Projet
o"
autofocus
>
@
error
(
'nome
Trabalh
o'
)
@
error
(
'nome
Projet
o'
)
<
span
class
=
"invalid-feedback"
role
=
"alert"
>
<
strong
>
{{
$message
}}
</
strong
>
</
span
>
...
...
@@ -140,7 +140,7 @@
{{-- Arquivo --}}
<div class="
col
-
sm
-
6
">
<label for="
anexoProjeto
" class="
col
-
form
-
label
">{{ __('Anexo Projeto:') }}</label>
<div class="
input
-
group
">
<div class="
custom
-
file
">
...
...
@@ -408,11 +408,16 @@
return
false
;
}
});
$
(
'#anexoProjeto'
)
.
on
(
'change'
,
function
()
{
//get the file name
var
fileName
=
$
(
this
)
.
val
();
//replace the "Choose a file" label
$
(
this
)
.
next
(
'#custom-file-label'
)
.
html
(
fileName
);
$
(
'.custom-file-input'
)
.
on
(
'change'
,
function
()
{
var
fieldVal
=
$
(
this
)
.
val
();
// Change the node's value by removing the fake path (Chrome)
fieldVal
=
fieldVal
.
replace
(
"C:
\\
fakepath
\\
"
,
""
);
if
(
fieldVal
!=
undefined
||
fieldVal
!=
""
)
{
$
(
this
)
.
next
(
".custom-file-label"
)
.
attr
(
'data-content'
,
fieldVal
);
$
(
this
)
.
next
(
".custom-file-label"
)
.
text
(
fieldVal
);
}
})
// F
$
(
'#buttonSim'
)
.
on
(
'click'
,
function
(
e
)
{
...
...
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