diff --git a/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v1/form/TermsAndConditionsImpl.java b/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v1/form/TermsAndConditionsImpl.java index ba467f2eab..a023919f4d 100644 --- a/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v1/form/TermsAndConditionsImpl.java +++ b/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v1/form/TermsAndConditionsImpl.java @@ -87,6 +87,7 @@ public boolean isShowAsPopup() { Map properties = super.getProperties(); if (resource.getValueMap().containsKey(CUSTOM_TNC_PROPERTY)) { properties.put(CUSTOM_TNC_PROPERTY, true); + properties.put("fd:" + ReservedProperties.PN_SHOW_AS_POPUP, isShowAsPopup()); } return properties; } diff --git a/bundles/af-core/src/test/java/com/adobe/cq/forms/core/components/internal/models/v1/form/TermsAndConditionsImplTest.java b/bundles/af-core/src/test/java/com/adobe/cq/forms/core/components/internal/models/v1/form/TermsAndConditionsImplTest.java index 228abc2260..bc2d902a4e 100644 --- a/bundles/af-core/src/test/java/com/adobe/cq/forms/core/components/internal/models/v1/form/TermsAndConditionsImplTest.java +++ b/bundles/af-core/src/test/java/com/adobe/cq/forms/core/components/internal/models/v1/form/TermsAndConditionsImplTest.java @@ -95,7 +95,6 @@ void testExportedType() throws Exception { public void testGetProperties() { TermsAndConditions tnc = Utils.getComponentUnderTest(PATH_TNC, TermsAndConditions.class, context); Assert.assertTrue(tnc.isShowApprovalOption()); - Assert.assertTrue(tnc.isShowAsPopup()); Assert.assertFalse(tnc.isShowLink()); } @@ -105,6 +104,7 @@ public void testCustomFDProperty() { Map props = tnc.getProperties(); Assert.assertTrue(props.containsKey("fd:tnc")); Assert.assertTrue((Boolean) props.get("fd:tnc")); + Assert.assertFalse((Boolean) props.get("fd:showAsPopup")); } diff --git a/bundles/af-core/src/test/resources/form/termsandconditions/exporter-termsandconditions.json b/bundles/af-core/src/test/resources/form/termsandconditions/exporter-termsandconditions.json index 895f1838db..c546869f5f 100644 --- a/bundles/af-core/src/test/resources/form/termsandconditions/exporter-termsandconditions.json +++ b/bundles/af-core/src/test/resources/form/termsandconditions/exporter-termsandconditions.json @@ -11,6 +11,7 @@ }, "fd:path": "/content/termsandconditions", "fd:tnc": true, + "fd:showAsPopup": false, "customProp": "customPropValue" }, "label": { diff --git a/bundles/af-core/src/test/resources/form/termsandconditions/exporter-termsandconditionsNoWrapData.json b/bundles/af-core/src/test/resources/form/termsandconditions/exporter-termsandconditionsNoWrapData.json index a2e0b6ead3..7d2c41c721 100644 --- a/bundles/af-core/src/test/resources/form/termsandconditions/exporter-termsandconditionsNoWrapData.json +++ b/bundles/af-core/src/test/resources/form/termsandconditions/exporter-termsandconditionsNoWrapData.json @@ -9,7 +9,8 @@ "dorExcludeDescription": false }, "fd:path": "/content/termsandconditionsNoWrapData", - "fd:tnc": true + "fd:tnc": true, + "fd:showAsPopup": false }, "label": { "value": "Terms And Conditions" diff --git a/bundles/af-core/src/test/resources/form/termsandconditions/test-content.json b/bundles/af-core/src/test/resources/form/termsandconditions/test-content.json index 3394a3594b..f1f8f0c7d8 100644 --- a/bundles/af-core/src/test/resources/form/termsandconditions/test-content.json +++ b/bundles/af-core/src/test/resources/form/termsandconditions/test-content.json @@ -3,7 +3,7 @@ "showApprovalOption": true, "jcr:title": "Terms And Conditions", "fd:tnc": true, - "showAsPopup": true, + "fd:showAsPopup": true, "name": "termsandconditions1694159302516", "sling:resourceType": "core/fd/components/form/termsandconditions/v1/termsandconditions", "wrapData": true, @@ -47,7 +47,7 @@ "showApprovalOption": true, "jcr:title": "Terms And Conditions", "fd:tnc": true, - "showAsPopup": true, + "fd:showAsPopup": false, "showLink": true, "name": "termsandconditions1694159302516", "sling:resourceType": "core/fd/components/form/termsandconditions/v1/termsandconditions", @@ -91,7 +91,7 @@ "showApprovalOption": true, "jcr:title": "Terms And Conditions", "fd:tnc": true, - "showAsPopup": true, + "fd:showAsPopup": true, "name": "termsandconditions1694159302516", "sling:resourceType": "core/fd/components/form/termsandconditions/v1/termsandconditions", "wrapData": true,