Skip to content

Commit

Permalink
#136 added submit button in all example schemas and removed in markup
Browse files Browse the repository at this point in the history
  • Loading branch information
smcgrath0 committed Aug 24, 2020
1 parent 77c84f1 commit 6ae0a1c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion fragments/form/sample-contact.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"title": "Form - Contact",
"group": "Features",
"model": {
"schema": "{\n\"fields\": [\n {\n \"type\": \"input\",\n \"inputType\": \"text\",\n \"label\": \"First Name\",\n \"model\": \"first_name\",\n \"id\": \"first_name\",\n \"placeholder\": \"First Name\"\n },{\n \"type\": \"input\",\n \"inputType\": \"text\",\n \"label\": \"Last Name\",\n \"model\": \"last_name\",\n \"id\": \"last_name\",\n \"placeholder\": \"Last Name\"\n },{\n \"type\": \"input\",\n \"inputType\": \"text\",\n \"label\": \"Email\",\n \"model\": \"email\",\n \"id\": \"email\",\n \"placeholder\": \"Email\",\n \"featured\": true,\n \"required\": true\n },{\n \"type\": \"textArea\",\n \"label\": \"Text\",\n \"model\": \"text\",\n \"id\": \"text\",\n \"rows\": 4,\n \"placeholder\": \"Enter text here\",\n \"featured\": true,\n \"required\": true\n }\n]}"
"schema": "{\n\"fields\": [\n {\n \"type\": \"input\",\n \"inputType\": \"text\",\n \"label\": \"First Name\",\n \"model\": \"first_name\",\n \"id\": \"first_name\",\n \"placeholder\": \"First Name\"\n },{\n \"type\": \"input\",\n \"inputType\": \"text\",\n \"label\": \"Last Name\",\n \"model\": \"last_name\",\n \"id\": \"last_name\",\n \"placeholder\": \"Last Name\"\n },{\n \"type\": \"input\",\n \"inputType\": \"text\",\n \"label\": \"Email\",\n \"model\": \"email\",\n \"id\": \"email\",\n \"placeholder\": \"Email\",\n \"featured\": true,\n \"required\": true\n },{\n \"type\": \"textArea\",\n \"label\": \"Text\",\n \"model\": \"text\",\n \"id\": \"text\",\n \"rows\": 4,\n \"placeholder\": \"Enter text here\",\n \"featured\": true,\n \"required\": true\n },{\n \"type\": \"submit\",\n \"buttonText\": \"Submit Button\",\n \"validateBeforeSubmit\": false\n }\n]}"
}
}
2 changes: 1 addition & 1 deletion fragments/form/sample.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"title": "Form",
"group": "Features",
"model": {
"schema": "{\n\"fields\": [\n {\n \"type\": \"input\",\n \"inputType\": \"text\",\n \"label\": \"Name\",\n \"model\": \"name\",\n \"id\": \"user_name\",\n \"placeholder\": \"Your name\",\n \"featured\": true,\n \"required\": true\n }\n]}"
"schema": "{\n\"fields\": [\n {\n \"type\": \"input\",\n \"inputType\": \"text\",\n \"label\": \"Name\",\n \"model\": \"name\",\n \"id\": \"user_name\",\n \"placeholder\": \"Your name\",\n \"featured\": true,\n \"required\": true\n },{\n \"type\": \"submit\",\n \"buttonText\": \"Submit Button\",\n \"validateBeforeSubmit\": false\n }\n]}"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" jcr:primaryType="per:Component" jcr:title="Form">
<jcr:content jcr:primaryType="nt:unstructured" __variations="true">
<sample jcr:primaryType="nt:unstructured" title="Form" group="Features">
<jcr:content jcr:primaryType="nt:unstructured" schema="{&#xA;&quot;fields&quot;: [&#xA; {&#xA; &quot;type&quot;: &quot;input&quot;,&#xA; &quot;inputType&quot;: &quot;text&quot;,&#xA; &quot;label&quot;: &quot;Name&quot;,&#xA; &quot;model&quot;: &quot;name&quot;,&#xA; &quot;id&quot;: &quot;user_name&quot;,&#xA; &quot;placeholder&quot;: &quot;Your name&quot;,&#xA; &quot;featured&quot;: true,&#xA; &quot;required&quot;: true&#xA; }&#xA;]}"/>
<jcr:content jcr:primaryType="nt:unstructured" schema="{&#xA;&quot;fields&quot;: [&#xA; {&#xA; &quot;type&quot;: &quot;input&quot;,&#xA; &quot;inputType&quot;: &quot;text&quot;,&#xA; &quot;label&quot;: &quot;Name&quot;,&#xA; &quot;model&quot;: &quot;name&quot;,&#xA; &quot;id&quot;: &quot;user_name&quot;,&#xA; &quot;placeholder&quot;: &quot;Your name&quot;,&#xA; &quot;featured&quot;: true,&#xA; &quot;required&quot;: true&#xA; },{&#xA; &quot;type&quot;: &quot;submit&quot;,&#xA; &quot;buttonText&quot;: &quot;Submit Button&quot;,&#xA; &quot;validateBeforeSubmit&quot;: false&#xA; }&#xA;]}"/>
</sample>
<sample-all jcr:primaryType="nt:unstructured" title="Form - Input Types" group="Features">
<jcr:content jcr:primaryType="nt:unstructured" schema="{&#xA;&quot;fields&quot;: [&#xA; {&#xA; &quot;type&quot;: &quot;label&quot;,&#xA; &quot;label&quot;: &quot;Label&quot;,&#xA; &quot;model&quot;: &quot;label&quot;&#xA; },{&#xA; &quot;type&quot;: &quot;input&quot;,&#xA; &quot;inputType&quot;: &quot;text&quot;,&#xA; &quot;label&quot;: &quot;Text&quot;,&#xA; &quot;model&quot;: &quot;text&quot;,&#xA; &quot;id&quot;: &quot;text&quot;,&#xA; &quot;placeholder&quot;: &quot;Text&quot;&#xA; },{&#xA; &quot;type&quot;: &quot;textArea&quot;,&#xA; &quot;label&quot;: &quot;Text Area&quot;,&#xA; &quot;model&quot;: &quot;textarea&quot;,&#xA; &quot;id&quot;: &quot;textarea&quot;,&#xA; &quot;rows&quot;: 4,&#xA; &quot;placeholder&quot;: &quot;Enter text here&quot;&#xA; },{&#xA; &quot;type&quot;: &quot;radios&quot;,&#xA; &quot;label&quot;: &quot;Radios&quot;,&#xA; &quot;model&quot;: &quot;radios&quot;,&#xA; &quot;values&quot;: [&#xA; &quot;Option 1&quot;,&#xA; &quot;Option 2&quot;&#xA; ]&#xA; },{&#xA; &quot;type&quot;: &quot;checkbox&quot;,&#xA; &quot;label&quot;: &quot;Checkbox&quot;,&#xA; &quot;model&quot;: &quot;checkbox&quot;,&#xA; &quot;default&quot;: true&#xA; },{&#xA; &quot;type&quot;: &quot;checklist&quot;,&#xA; &quot;label&quot;: &quot;Checklist&quot;,&#xA; &quot;model&quot;: &quot;checklist&quot;,&#xA; &quot;listBox&quot;: true,&#xA; &quot;values&quot;: [&#xA; &quot;Option 1&quot;,&#xA; &quot;Option 2&quot;&#xA; ]&#xA; },{&#xA; &quot;type&quot;: &quot;select&quot;,&#xA; &quot;label&quot;: &quot;Select&quot;,&#xA; &quot;model&quot;: &quot;select&quot;,&#xA; &quot;values&quot;: [&#xA; &quot;Option 1&quot;,&#xA; &quot;Option 2&quot;&#xA; ]&#xA; },{&#xA; &quot;type&quot;: &quot;submit&quot;,&#xA; &quot;buttonText&quot;: &quot;Submit Button&quot;,&#xA; &quot;validateBeforeSubmit&quot;: false&#xA; }&#xA;]}"/>
</sample-all>
<sample-contact jcr:primaryType="nt:unstructured" title="Form - Contact" group="Features">
<jcr:content jcr:primaryType="nt:unstructured" schema="{&#xA;&quot;fields&quot;: [&#xA; {&#xA; &quot;type&quot;: &quot;input&quot;,&#xA; &quot;inputType&quot;: &quot;text&quot;,&#xA; &quot;label&quot;: &quot;First Name&quot;,&#xA; &quot;model&quot;: &quot;first_name&quot;,&#xA; &quot;id&quot;: &quot;first_name&quot;,&#xA; &quot;placeholder&quot;: &quot;First Name&quot;&#xA; },{&#xA; &quot;type&quot;: &quot;input&quot;,&#xA; &quot;inputType&quot;: &quot;text&quot;,&#xA; &quot;label&quot;: &quot;Last Name&quot;,&#xA; &quot;model&quot;: &quot;last_name&quot;,&#xA; &quot;id&quot;: &quot;last_name&quot;,&#xA; &quot;placeholder&quot;: &quot;Last Name&quot;&#xA; },{&#xA; &quot;type&quot;: &quot;input&quot;,&#xA; &quot;inputType&quot;: &quot;text&quot;,&#xA; &quot;label&quot;: &quot;Email&quot;,&#xA; &quot;model&quot;: &quot;email&quot;,&#xA; &quot;id&quot;: &quot;email&quot;,&#xA; &quot;placeholder&quot;: &quot;Email&quot;,&#xA; &quot;featured&quot;: true,&#xA; &quot;required&quot;: true&#xA; },{&#xA; &quot;type&quot;: &quot;textArea&quot;,&#xA; &quot;label&quot;: &quot;Text&quot;,&#xA; &quot;model&quot;: &quot;text&quot;,&#xA; &quot;id&quot;: &quot;text&quot;,&#xA; &quot;rows&quot;: 4,&#xA; &quot;placeholder&quot;: &quot;Enter text here&quot;,&#xA; &quot;featured&quot;: true,&#xA; &quot;required&quot;: true&#xA; }&#xA;]}"/>
<jcr:content jcr:primaryType="nt:unstructured" schema="{&#xA;&quot;fields&quot;: [&#xA; {&#xA; &quot;type&quot;: &quot;input&quot;,&#xA; &quot;inputType&quot;: &quot;text&quot;,&#xA; &quot;label&quot;: &quot;First Name&quot;,&#xA; &quot;model&quot;: &quot;first_name&quot;,&#xA; &quot;id&quot;: &quot;first_name&quot;,&#xA; &quot;placeholder&quot;: &quot;First Name&quot;&#xA; },{&#xA; &quot;type&quot;: &quot;input&quot;,&#xA; &quot;inputType&quot;: &quot;text&quot;,&#xA; &quot;label&quot;: &quot;Last Name&quot;,&#xA; &quot;model&quot;: &quot;last_name&quot;,&#xA; &quot;id&quot;: &quot;last_name&quot;,&#xA; &quot;placeholder&quot;: &quot;Last Name&quot;&#xA; },{&#xA; &quot;type&quot;: &quot;input&quot;,&#xA; &quot;inputType&quot;: &quot;text&quot;,&#xA; &quot;label&quot;: &quot;Email&quot;,&#xA; &quot;model&quot;: &quot;email&quot;,&#xA; &quot;id&quot;: &quot;email&quot;,&#xA; &quot;placeholder&quot;: &quot;Email&quot;,&#xA; &quot;featured&quot;: true,&#xA; &quot;required&quot;: true&#xA; },{&#xA; &quot;type&quot;: &quot;textArea&quot;,&#xA; &quot;label&quot;: &quot;Text&quot;,&#xA; &quot;model&quot;: &quot;text&quot;,&#xA; &quot;id&quot;: &quot;text&quot;,&#xA; &quot;rows&quot;: 4,&#xA; &quot;placeholder&quot;: &quot;Enter text here&quot;,&#xA; &quot;featured&quot;: true,&#xA; &quot;required&quot;: true&#xA; },{&#xA; &quot;type&quot;: &quot;submit&quot;,&#xA; &quot;buttonText&quot;: &quot;Submit Button&quot;,&#xA; &quot;validateBeforeSubmit&quot;: false&#xA; }&#xA;]}"/>
</sample-contact>
</jcr:content>
</jcr:root>

0 comments on commit 6ae0a1c

Please sign in to comment.