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
f6fab2b4
Commit
f6fab2b4
authored
Oct 25, 2022
by
unknown
Browse files
Validação no campo ODS na Edição de propostas
parent
13e6248a
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/Http/Requests/UpdateTrabalho.php
View file @
f6fab2b4
...
...
@@ -110,6 +110,7 @@ class UpdateTrabalho extends FormRequest
if
(
$evento
->
natureza_id
==
3
){
$rules
[
'area_tematica_id'
]
=
[
'required'
,
'string'
];
$rules
[
'ods'
]
=
[
'required'
];
}
$rules
[
'linkLattesEstudante'
]
=
[
'required'
,
'string'
];
...
...
resources/views/projeto/editaFormulario/projeto.blade.php
View file @
f6fab2b4
...
...
@@ -93,13 +93,18 @@
<div
class=
"row col-md-12"
>
@foreach($listaOds as $ods)
<div
class=
"col-md-6"
>
<input
type=
"checkbox"
name=
"ods[]"
id=
"ods{{$ods->id}}"
value=
"{{$ods->id}}"
@
if
($
projeto-
>
ods->contains($ods->id)) checked @endif >
<input
type=
"checkbox"
name=
"ods[]"
id=
"ods{{$ods->id}}"
value=
"{{$ods->id}}"
@
if
(
(
empty
(
old
('
ods
'))
&&
$
projeto-
>
ods->contains($ods->id))
|| (!empty(old('ods'))
&&
in_array($ods->id, old('ods'))))
checked @endif >
<label
class=
"form-check-label"
for=
"ods{{$ods->id}}"
>
{{ $ods->nome }}
</label>
</div>
@endforeach
</div>
@error('ods')
<span
class=
"invalid-feedback"
role=
"alert"
style=
"overflow: visible; display:block"
>
<strong>
{{ $message }}
</strong>
</span>
@enderror
</div>
</div>
@endif
...
...
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