Skip to content
Snippets Groups Projects

Feature/istwcms 7161 kpaxman remove video check

Open Kevin Paxman requested to merge feature/ISTWCMS-7141-kpaxman-remove_video_check into 1.1.x
1 file
+ 16
5
Compare changes
  • Side-by-side
  • Inline
@@ -171,12 +171,23 @@ function _uw_cfg_common_banner_validate(
else {
// If there is a banner, ensure that it has an image.
// Video validation works without special code.
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_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