-
Notifications
You must be signed in to change notification settings - Fork 427
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
proxy components for terms and conditions
- Loading branch information
Showing
2 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
...n/content/jcr_root/apps/__appId__/components/adaptiveForm/termsandconditions/.content.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?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" xmlns:sling="http://sling.apache.org/jcr/sling/1.0" | ||
jcr:description="Terms And Conditions." | ||
jcr:primaryType="cq:Component" | ||
jcr:title="Terms And Conditions" | ||
sling:resourceSuperType="core/fd/components/form/termsandconditions/v1/termsandconditions" | ||
componentGroup="${appTitle} - Adaptive Form"/> |
42 changes: 42 additions & 0 deletions
42
...ntent/jcr_root/apps/__appId__/components/adaptiveForm/termsandconditions/_cq_template.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?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="nt:unstructured" | ||
jcr:title="Terms And Conditions" | ||
fieldType="panel" | ||
fd:tnc="{Boolean}true" | ||
wrapData="{Boolean}true"> | ||
<text | ||
name="consenttext" | ||
jcr:primaryType="nt:unstructured" | ||
jcr:title="\0" | ||
sling:resourceType="${appId}/components/adaptiveForm/text" | ||
fieldType="plain-text" | ||
hideTitle="true" | ||
value="Text related to the terms and conditions come here"/> | ||
<approvalcheckbox | ||
name="approvalcheckbox" | ||
jcr:primaryType="nt:unstructured" | ||
jcr:title="I agree to the terms & conditions" | ||
sling:resourceType="${appId}/components/adaptiveForm/checkbox" | ||
enabled="false" | ||
checkedValue="true" | ||
fieldType="checkbox"> | ||
</approvalcheckbox> | ||
<link | ||
jcr:primaryType="nt:unstructured" | ||
jcr:title="\0" | ||
sling:resourceType="core/fd/components/form/toggleablelink/v1/toggleablelink" | ||
orientation="vertical" | ||
type="string[]" | ||
enum="https://your-link-here" | ||
enumNames="[Terms and Conditions Link]" | ||
fieldType="checkbox-group" | ||
title="I agree to the terms & conditions"> | ||
<fd:rules | ||
jcr:primaryType="nt:unstructured" | ||
validationStatus="valid"/> | ||
<fd:events | ||
jcr:primaryType="nt:unstructured" | ||
change="[if(length($field.$value) == length($field.$enum)\, dispatchEvent($parent.approvalcheckbox\, 'custom:setProperty'\, {enabled : true()})\, {})]"/> | ||
</link> | ||
</jcr:root> |