Skip to content

Commit

Permalink
Cq 4346045 (#965)
Browse files Browse the repository at this point in the history
* CQ-4346045 forms core component should be included only for cloud. Github Issue #964

* CQ-4346045 guideComponentType in af2 templates

* CQ-4346045 null check to avoid getAttribute Error

Co-authored-by: barshatr <barshatr@adobe.com>
  • Loading branch information
barshat7 and barshatr committed Jul 25, 2022
1 parent 8c3509e commit 7c4a955
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/archetype/all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@
<target>/apps/${appId}-vendor-packages/application/install</target>
</embedded>
#end
#if ( $includeExamples == "y" and ($includeForms == "y" or $includeFormsenrollment == "y" or $includeFormscommunications == "y" or $includeFormsheadless == "y") )
#if ( $includeExamples == "y" and ( ($includeForms == "y" or $includeFormsenrollment == "y" or $includeFormscommunications == "y" or $includeFormsheadless == "y") and $aemVersion == "cloud" ) )
<embedded>
<groupId>com.adobe.aem</groupId>
<artifactId>core-forms-components-examples-apps</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
jcr:primaryType="cq:Page">
<jcr:content
cq:deviceGroups="[/etc/mobile/groups/responsive]"
guideComponentType="fd/af/templates"
jcr:primaryType="cq:PageContent"
sling:resourceType="${appId}/components/page">
<parsys1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
cq:deviceGroups="[/etc/mobile/groups/responsive]"
cq:template="/conf/${appId}/settings/wcm/templates/blank-af-v2"
jcr:primaryType="cq:PageContent"
sling:resourceType="${appId}/components/page">
sling:resourceType="${appId}/components/page"
guideComponentType="fd/af/templates">
<parsys1
jcr:primaryType="nt:unstructured"
sling:resourceType="wcm/foundation/components/responsivegrid"/>
Expand Down
4 changes: 3 additions & 1 deletion src/main/archetype/ui.frontend.react.forms.af/src/Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ export const getId = () => {
let id = ""
if (!process.env.FORMPATH) {
const parent = document.querySelector(".cmp-formcontainer")
id = parent.getAttribute("data-form-id")
if (parent) {
id = parent.getAttribute("data-form-id")
}
} else {
id = base64url(process.env.FORMPATH)
}
Expand Down

0 comments on commit 7c4a955

Please sign in to comment.