Skip to content

Commit c3a752b

Browse files
ChrisKianbrianchandotcom
authored andcommitted
LPD-68504 Resolve test errors/failures by properly hiding new feature behind FF
1 parent 3b51c91 commit c3a752b

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

modules/apps/cookies/cookies-banner-web/src/main/resources/META-INF/resources/js/ConfigurationFormEventHandler.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,19 @@ export default function ({namespace}) {
2121

2222
if (event.delegateTarget.id === `${namespace}enabled`) {
2323
if (event.delegateTarget.checked) {
24-
consentRenewalPeriod.removeAttribute('disabled');
25-
consentRenewalPeriod.required = true;
24+
if (Liferay.FeatureFlags['LPD-65277']) {
25+
consentRenewalPeriod.removeAttribute('disabled');
26+
consentRenewalPeriod.required = true;
27+
}
2628

2729
explicitConsentMode.removeAttribute('disabled');
2830
}
2931
else {
30-
consentRenewalPeriod.required = false;
31-
consentRenewalPeriod.setAttribute('disabled', '');
32-
consentRenewalPeriod.value = 12;
32+
if (Liferay.FeatureFlags['LPD-65277']) {
33+
consentRenewalPeriod.required = false;
34+
consentRenewalPeriod.setAttribute('disabled', '');
35+
consentRenewalPeriod.value = 12;
36+
}
3337

3438
explicitConsentMode.checked = true;
3539
explicitConsentMode.setAttribute('disabled', '');

modules/apps/product-analytics/product-analytics-web/src/main/resources/META-INF/resources/product_analytics_banner/js/ProductAnalyticsBanner.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,10 @@ function checkProductAnalyticsConsentForTypes(cookieTypes, modalOptions) {
237237
}
238238

239239
function isProductAnalyticsConfigurationModified(lastModified) {
240+
if (!Liferay.FeatureFlags['LPD-65277']) {
241+
return false;
242+
}
243+
240244
const productAnalyticsConfiguredDateCookie = getCookie(
241245
productAnalyticsConfiguredDateCookieName
242246
);

0 commit comments

Comments
 (0)