Skip to content

Commit

Permalink
Add af2 fragment template type, fragment container component, fragmen…
Browse files Browse the repository at this point in the history
…t component and captcha component. (#1129)

* FORMS-9265 Include editable template for fragment 2.0 as part of archetype.

* Adding fragment, captcha components.

* Adding fragment template specific thumbnail.

---------

Co-authored-by: Pankaj Parashar <[email protected]>
  • Loading branch information
sakshi-arora1 and pankaj-parashar authored Sep 7, 2023
1 parent 3bb5404 commit dd14414
Show file tree
Hide file tree
Showing 13 changed files with 116 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="cq:Component"
jcr:title="Adaptive Form Fragment"
jcr:description="Adaptive Form Fragment placeholder (v1) component"
sling:resourceSuperType="core/fd/components/form/fragment/v1/fragment"
componentGroup="${appTitle} - Adaptive Form"/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0"
jcr:primaryType="nt:unstructured"
jcr:title="Fragment"
fieldType="panel"/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="cq:Component"
jcr:title="Adaptive Form Fragment Container (Core Component)"
jcr:description="Adaptive Form Fragment Container (Core Component) (v1) component"
sling:resourceSuperType="core/fd/components/form/fragmentcontainer/v1/fragmentcontainer"
componentGroup=".hidden"/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:fd="http://www.adobe.com/aemfd/fd/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0"
jcr:primaryType="nt:unstructured"
jcr:title="Form Container"
fd:version="2.1"
fieldType="form"/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
cq:icon="shield"
jcr:primaryType="cq:Component"
jcr:title="Adaptive Form reCAPTCHA"
jcr:description="Adaptive Form reCAPTCHA (v1) component"
sling:resourceSuperType="core/fd/components/form/recaptcha/v1/recaptcha"
componentGroup="${appTitle} - Adaptive Form"/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0"
jcr:primaryType="nt:unstructured"
jcr:title="CAPTCHA"
required="{Boolean}true"
fieldType="captcha"/>
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,7 @@
#if ( $includeForms == "y" or $includeFormsenrollment == "y" or $includeFormscommunications == "y" or $includeFormsheadless == "y" )
<af-page-v2/>
#end
#if ( $aemVersion == "cloud" and ( $includeForms == "y" or $includeFormsenrollment == "y" or $includeFormscommunications == "y" or $includeFormsheadless == "y") )
<afv2-fragment-page/>
#end
</jcr:root>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0"
jcr:primaryType="cq:Template">
<jcr:content
jcr:description="Adaptive Form Fragment Template with core components."
jcr:primaryType="cq:PageContent"
jcr:title="Adaptive Form Fragment (Core Components)"/>
</jcr:root>
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:fd="http://www.adobe.com/aemfd/fd/1.0"
jcr:primaryType="cq:Page">
<jcr:content
cq:deviceGroups="[/etc/mobile/groups/responsive]"
jcr:primaryType="cq:PageContent"
sling:resourceType="${appId}/components/adaptiveForm/page"
#if ( $aemVersion == "cloud")
sling:configRef="/conf/${appId}/forms"
#end
guideComponentType="fd/af/templates">
<guideContainer
fd:version="2.1"
jcr:primaryType="nt:unstructured"
sling:resourceType="${appId}/components/adaptiveForm/fragmentcontainer"
fieldType="form"
fd:type="fragment"/>
</jcr:content>
</jcr:root>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0"
jcr:primaryType="cq:Page">
<jcr:content
cq:policy="${appId}/components/page/policy"
jcr:primaryType="nt:unstructured"
sling:resourceType="wcm/core/components/policies/mappings">
<guideContainer
cq:policy="${appId}/components/adaptiveForm/formcontainer/default"
jcr:primaryType="nt:unstructured"
sling:resourceType="wcm/core/components/policies/mapping"/>
</jcr:content>
</jcr:root>
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:fd="http://www.adobe.com/aemfd/fd/1.0"
jcr:primaryType="cq:Page">
<jcr:content
cq:deviceGroups="[/etc/mobile/groups/responsive]"
jcr:primaryType="cq:PageContent"
sling:resourceType="${appId}/components/adaptiveForm/page"
guideComponentType="fd/af/templates">
<guideContainer
fd:version="2.1"
jcr:primaryType="nt:unstructured"
sling:resourceType="${appId}/components/adaptiveForm/fragmentcontainer"
editable="{Boolean}true"
fieldType="form"
fd:type="fragment"/>
<cq:responsive jcr:primaryType="nt:unstructured">
<breakpoints jcr:primaryType="nt:unstructured">
<smallScreen
jcr:primaryType="nt:unstructured"
title="Smaller Screen"
width="{Decimal}479"/>
<phone
jcr:primaryType="nt:unstructured"
title="Phone"
width="{Decimal}767"/>
<tablet
jcr:primaryType="nt:unstructured"
title="Tablet"
width="{Decimal}991"/>
</breakpoints>
</cq:responsive>
</jcr:content>
</jcr:root>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/main/resources/META-INF/archetype-post-generate.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ if (includeForms == "n" && includeFormsenrollment == "n" && includeFormscommunic
assert new File("$appsFolder/components/adaptiveForm").deleteDir()
assert new File("$appsFolder/components/formsandcommunicationportal").deleteDir()
assert new File("$confFolder/settings/wcm/template-types/af-page-v2").deleteDir()
assert new File("$confFolder/settings/wcm/template-types/afv2-fragment-page").deleteDir()
assert new File("$confFolder/settings/wcm/templates/blank-af-v2").deleteDir()
assert new File("$confFolder/forms").deleteDir()
}
Expand Down

0 comments on commit dd14414

Please sign in to comment.