Skip to content
Merged
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 @@ -46,6 +46,7 @@
public class TermsAndConditionsImpl extends PanelImpl implements TermsAndConditions {

private static final String CUSTOM_TNC_PROPERTY = "fd:tnc";
private static final String SHOW_AS_POPUP_PROPERTY = "fd:showAsPopup";

@JsonIgnore
@ValueMapValue(injectionStrategy = InjectionStrategy.OPTIONAL, name = ReservedProperties.PN_SHOW_APPROVAL_OPTION)
Expand Down Expand Up @@ -88,6 +89,7 @@ public boolean isShowAsPopup() {
if (resource.getValueMap().containsKey(CUSTOM_TNC_PROPERTY)) {
properties.put(CUSTOM_TNC_PROPERTY, true);
}
properties.put(SHOW_AS_POPUP_PROPERTY, isShowAsPopup());
return properties;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ public void testCustomFDProperty() {
Map<String, Object> props = tnc.getProperties();
Assert.assertTrue(props.containsKey("fd:tnc"));
Assert.assertTrue((Boolean) props.get("fd:tnc"));
Assert.assertTrue(props.containsKey("fd:showAsPopup"));
Assert.assertTrue((Boolean) props.get("fd:showAsPopup"));

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"properties": {
"fd:path": "/content/termsandconditions",
"fd:tnc": true,
"fd:showAsPopup": true,
"customProp": "customPropValue"
},
"label": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"name": "termsandconditions1694159302516",
"properties": {
"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 @@ -53,6 +53,7 @@
jcr:title="File Input - 3"
sling:resourceType="core/fd/components/form/fileinput/v4/fileinput"
accept="[application/pdf]"
acceptMessage="This file type is not supported!"
description="This is long description"
fieldType="file-input"
id="fileinput_tooltip_scenario_test"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,24 @@
cssSelector=".cmp-adaptiveform-container__hamburger-menu-link:active"/>
</states>
</hamburgerMenuLink>
<hamburgerMenuItem
jcr:primaryType="nt:unstructured"
jcr:title="Item"
id="af2_hamburgermenuitem"
cssSelector=".cmp-adaptiveform-container__hamburger-menu-item"
longTitle="Hamburger Menu Item"
propertySheet="/mnt/overlay/fd/af/components/stylePropertySheet/common">
<states jcr:primaryType="nt:unstructured">
<hidden
jcr:primaryType="nt:unstructured"
jcr:title="Hidden"
cssSelector=".cmp-adaptiveform-container__hamburger-menu-item[data-panel-visible='false']"/>
<disabled
jcr:primaryType="nt:unstructured"
jcr:title="Disabled"
cssSelector=".cmp-adaptiveform-container__hamburger-menu-item[data-panel-enabled='false']"/>
</states>
</hamburgerMenuItem>
<hamburgerMenuItemActive
jcr:primaryType="nt:unstructured"
jcr:title="Active Item"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ if (typeof window.HamburgerMenu === 'undefined') {
};

static cssClasses = {
item: `${HamburgerMenu.bemBlock}-item`,
active: `${HamburgerMenu.bemBlock}-item--active`,
activeParent: `${HamburgerMenu.bemBlock}-item--activeparent`,
hamburgerMenuWidget: {
Expand Down Expand Up @@ -108,6 +109,7 @@ if (typeof window.HamburgerMenu === 'undefined') {
textSpan.setAttribute('tabindex', "0");
link.appendChild(textSpan);
li.appendChild(link);
li.classList.add(HamburgerMenu.cssClasses.item);
li.setAttribute('data-panel-id', item?.id);
li.setAttribute('data-panel-visible', item?.visible);
li.setAttribute('data-panel-enabled', item?.enabled);
Expand Down Expand Up @@ -289,7 +291,8 @@ if (typeof window.HamburgerMenu === 'undefined') {
link.appendChild(textSpan);
link.style.visibility = item?.label?.visible ? 'visible' : 'hidden';
li.appendChild(link);


li.classList.add(HamburgerMenu.cssClasses.item);
li.setAttribute('data-panel-id', item?.id);
li.setAttribute('data-panel-visible', item?.visible);
li.setAttribute('data-panel-enabled', item?.enabled);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,14 @@
id="af2_fileinputfilename"
cssSelector=".cmp-adaptiveform-fileinput__filename"
longTitle="File Input File Name"
propertySheet="/mnt/overlay/fd/af/components/stylePropertySheet/common"/>
propertySheet="/mnt/overlay/fd/af/components/stylePropertySheet/common">
<states jcr:primaryType="nt:unstructured">
<hover
jcr:primaryType="nt:unstructured"
jcr:title="Hover"
cssSelector=".cmp-adaptiveform-fileinput__filename:hover"/>
</states>
</fileinputFileName>
<fileinputFileDelete
jcr:primaryType="nt:unstructured"
jcr:title="File Delete"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,14 @@
id="af2_fileinputfilename"
cssSelector=".cmp-adaptiveform-fileinput__filename"
longTitle="File Input File Name"
propertySheet="/mnt/overlay/fd/af/components/stylePropertySheet/common"/>
propertySheet="/mnt/overlay/fd/af/components/stylePropertySheet/common">
<states jcr:primaryType="nt:unstructured">
<hover
jcr:primaryType="nt:unstructured"
jcr:title="Hover"
cssSelector=".cmp-adaptiveform-fileinput__filename:hover"/>
</states>
</fileinputFileName>
<fileinputFileDelete
jcr:primaryType="nt:unstructured"
jcr:title="File Delete"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ if (typeof window.FileInputWidget === 'undefined') {
const messages = {
[this.invalidFeature.SIZE]: customMessages.maxFileSize || FormView.LanguageUtils.getTranslatedString(this.lang, "FileSizeGreater", [fileNames, this.options.maxFileSize]),
[this.invalidFeature.NAME]: customMessages.invalidFileName || FormView.LanguageUtils.getTranslatedString(this.lang, "FileNameInvalid", [fileNames]),
[this.invalidFeature.MIMETYPE]: customMessages.invalidMimeType || FormView.LanguageUtils.getTranslatedString(this.lang, "FileMimeTypeInvalid", [fileNames]),
[this.invalidFeature.MIMETYPE]: customMessages.accept || FormView.LanguageUtils.getTranslatedString(this.lang, "FileMimeTypeInvalid", [fileNames]),
[this.invalidFeature.SIZE_ZERO]: customMessages.zeroFileSize || FormView.LanguageUtils.getTranslatedString(this.lang, "FileSizeZero", [fileNames])
};
return messages[invalidFeature];
Expand Down
Loading
Loading