Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
uw_cfg_common
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
WCMS
uw_cfg_common
Merge requests
!485
ISTWCMS-7141: fix adding media to banners
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
ISTWCMS-7141: fix adding media to banners
feature/ISTWCMS-7141-ebremner-fix-adding-media-to-banners
into
1.1.x
Overview
0
Commits
6
Pipelines
0
Changes
1
Merged
Eric Bremner
requested to merge
feature/ISTWCMS-7141-ebremner-fix-adding-media-to-banners
into
1.1.x
5 months ago
Overview
0
Commits
6
Pipelines
0
Changes
1
Expand
0
0
Merge request reports
Compare
1.1.x
version 5
ae4fbfa6
5 months ago
version 4
b7658a4e
5 months ago
version 3
a14b572a
5 months ago
version 2
2747a8de
5 months ago
version 1
5fd46928
5 months ago
1.1.x (base)
and
latest version
latest version
bcd21f1a
6 commits,
5 months ago
version 5
ae4fbfa6
5 commits,
5 months ago
version 4
b7658a4e
4 commits,
5 months ago
version 3
a14b572a
3 commits,
5 months ago
version 2
2747a8de
2 commits,
5 months ago
version 1
5fd46928
1 commit,
5 months ago
1 file
+
32
−
6
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
includes/validate_functions.php
+
32
−
6
Options
@@ -170,13 +170,39 @@ function _uw_cfg_common_banner_validate(
}
else
{
// If there is a banner, ensure that it has an image.
// If there is a banner, ensure that it has an image
or video
.
if
(
isset
(
$value
[
'subform'
]))
{
if
(
!
isset
(
$value
[
'subform'
][
'field_uw_ban_image'
][
'selection'
]))
{
$form_state
->
setError
(
$form
[
'field_uw_banner'
][
'widget'
][
$key
][
'subform'
][
'field_uw_ban_image'
][
'widget'
],
t
(
"You must select an image"
)
);
if
(
isset
(
$value
[
'subform'
][
'field_uw_ban_video'
]))
{
if
(
!
isset
(
$value
[
'subform'
][
'field_uw_ban_video'
][
'selection'
]))
{
if
(
isset
(
$form
[
'settings'
]))
{
$form_state
->
setError
(
$form
[
'settings'
][
'block_form'
][
'field_uw_banner_item'
][
'widget'
][
$key
][
'subform'
][
'field_uw_ban_video'
][
'widget'
],
t
(
"You must select a video"
)
);
}
else
{
$form_state
->
setError
(
$form
[
'field_uw_banner'
][
'widget'
][
$key
][
'subform'
][
'field_uw_ban_video'
][
'widget'
],
t
(
"You must select a video"
)
);
}
}
}
if
(
isset
(
$value
[
'subform'
][
'field_uw_ban_image'
]))
{
if
(
!
isset
(
$value
[
'subform'
][
'field_uw_ban_image'
][
'selection'
]))
{
if
(
isset
(
$form
[
'settings'
]))
{
$form_state
->
setError
(
$form
[
'settings'
][
'block_form'
][
'field_uw_banner_item'
][
'widget'
][
$key
][
'subform'
][
'field_uw_ban_image'
][
'widget'
],
t
(
"You must select an image"
)
);
}
else
{
$form_state
->
setError
(
$form
[
'field_uw_banner'
][
'widget'
][
$key
][
'subform'
][
'field_uw_ban_image'
][
'widget'
],
t
(
"You must select an image"
)
);
}
}
}
}
}
Loading