Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ private ReservedProperties() {
public static final String FD_ENABLE_AUTO_SAVE = "fd:enableAutoSave";
public static final String FD_AUTO_SAVE_STRATEGY_TYPE = "fd:autoSaveStrategyType";
public static final String FD_AUTO_SAVE_INTERVAL = "fd:autoSaveInterval";
public static final String FD_PN_SHOW_AS_POPUP = "fd:showAsPopup";
private static final Set<String> reservedProperties = aggregateReservedProperties();

private static Set<String> aggregateReservedProperties() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ public boolean isShowAsPopup() {
Map<String, Object> properties = super.getProperties();
if (resource.getValueMap().containsKey(CUSTOM_TNC_PROPERTY)) {
properties.put(CUSTOM_TNC_PROPERTY, true);
properties.put(ReservedProperties.FD_PN_SHOW_AS_POPUP, isShowAsPopup());
}
return properties;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}

Expand All @@ -105,6 +104,7 @@ public void testCustomFDProperty() {
Map<String, Object> props = tnc.getProperties();
Assert.assertTrue(props.containsKey("fd:tnc"));
Assert.assertTrue((Boolean) props.get("fd:tnc"));
Assert.assertFalse((Boolean) props.get("fd:showAsPopup"));

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
},
"fd:path": "/content/termsandconditions",
"fd:tnc": true,
"fd:showAsPopup": false,
"customProp": "customPropValue"
},
"label": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"dorExcludeDescription": false
},
"fd:path": "/content/termsandconditionsNoWrapData",
"fd:tnc": true
"fd:tnc": true,
"fd:showAsPopup": true
},
"label": {
"value": "Terms And Conditions"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"showApprovalOption": true,
"jcr:title": "Terms And Conditions",
"fd:tnc": true,
"showAsPopup": true,
"showAsPopup": false,
"name": "termsandconditions1694159302516",
"sling:resourceType": "core/fd/components/form/termsandconditions/v1/termsandconditions",
"wrapData": true,
Expand Down