From 9b6d2c14da6d8030360aa2f8385760829fd00c1b Mon Sep 17 00:00:00 2001 From: alexandru-stancioiu Date: Fri, 19 Jul 2024 15:58:41 +0300 Subject: [PATCH] [SITES-22335] Remove validation of ImageFromPageImage for image v2 (#2811) Co-authored-by: Alexandru Marian Stancioiu --- .../components/image/v2/image/clientlibs/editor/js/image.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/content/src/content/jcr_root/apps/core/wcm/components/image/v2/image/clientlibs/editor/js/image.js b/content/src/content/jcr_root/apps/core/wcm/components/image/v2/image/clientlibs/editor/js/image.js index 8160c639c9..bb8b4d71a3 100644 --- a/content/src/content/jcr_root/apps/core/wcm/components/image/v2/image/clientlibs/editor/js/image.js +++ b/content/src/content/jcr_root/apps/core/wcm/components/image/v2/image/clientlibs/editor/js/image.js @@ -135,17 +135,14 @@ selector: altInputSelector, validate: function() { var seededValue = document.querySelector(altInputSelector).getAttribute("data-seeded-value"); - var isImageFromPageImageChecked = document.querySelector('coral-checkbox[name="./imageFromPageImage"]').checked; var altFromDAM = document.querySelector('coral-checkbox[name="./altValueFromDAM"]'); var isAltFromDAMChecked = altFromDAM.checked; var isAltFromDAMDisabled = altFromDAM.disabled; - var isAltFromPageImageChecked = document.querySelector('coral-checkbox[name="./altValueFromPageImage"]').checked; var isDecorativeChecked = document.querySelector("coral-checkbox[name='./isDecorative']").checked; var assetWithoutDescriptionErrorMessage = "Error: Please provide an asset which has a description that can be used as alt text."; if (!isDecorativeChecked && !seededValue && - ((isImageFromPageImageChecked && isAltFromPageImageChecked) || - (!isImageFromPageImageChecked && isAltFromDAMChecked && !isAltFromDAMDisabled))) { + (isAltFromDAMChecked && !isAltFromDAMDisabled)) { return Granite.I18n.get(assetWithoutDescriptionErrorMessage); } }