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
13e6248a
Commit
13e6248a
authored
Oct 25, 2022
by
unknown
Browse files
Validação para ODS na submissão de propostas
parent
282795a6
Changes
2
Show whitespace changes
Inline
Side-by-side
app/Http/Requests/StoreTrabalho.php
View file @
13e6248a
...
...
@@ -93,6 +93,8 @@ class StoreTrabalho extends FormRequest
$rules
[
'area_id'
]
=
[
Rule
::
requiredIf
(
$evento
->
natureza_id
!=
3
),
'string'
];
if
(
$evento
->
natureza_id
==
3
){
$rules
[
'area_tematica_id'
]
=
[
'required'
,
'string'
];
$rules
[
'ods'
]
=
[
'required'
];
}
$rules
[
'linkLattesEstudante'
]
=
[
'required'
,
'string'
];
...
...
resources/views/evento/formulario/projeto.blade.php
View file @
13e6248a
...
...
@@ -88,18 +88,18 @@
<div
class=
"row col-md-12"
>
<div
class=
"form-group col-md-12"
>
<label
for=
"ods"
class=
"col-form-label"
style=
"font-weight: bold"
>
{{ __('Objetivo de Densenvolvimento Sustentável') }}
<span
style=
"color: red; font-weight:bold"
>
*
</span></label><br>
<label
for=
"ods
_id
"
class=
"col-form-label"
style=
"font-weight: bold"
>
{{ __('Objetivo de Densenvolvimento Sustentável') }}
<span
style=
"color: red; font-weight:bold"
>
*
</span></label><br>
<div
class=
"row col-md-12"
>
@foreach($ods as $od)
<div
class=
"col-md-6"
>
<input
type=
"checkbox"
name=
"ods[]"
id=
"ods{{$od->id}}"
value=
"{{$od->id}}"
>
<input
type=
"checkbox"
name=
"ods[]"
id=
"ods{{$od->id}}"
class=
"@error('ods_id') is-invalid @enderror"
value=
"{{$od->id}}"
@
if
(!
empty
(
old
('
ods
'))
&&
in_array
($
od-
>
id, old('ods'))) checked @endif
>
<label
class=
"form-check-label"
for=
"ods{{$od->id}}"
>
{{ $od->nome }}
</label>
</div>
@endforeach
</div>
@error('ods
_id
')
@error('ods')
<span
class=
"invalid-feedback"
role=
"alert"
style=
"overflow: visible; display:block"
>
<strong>
{{ $message }}
</strong>
</span>
...
...
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