-
Notifications
You must be signed in to change notification settings - Fork 237
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Delete this commit. Demo for testing
Demo for testing that data in various shapes doesn't get overwritten. Next step: have tests to handle this.
- Loading branch information
1 parent
83efefe
commit 399dd8e
Showing
3 changed files
with
131 additions
and
4 deletions.
There are no files selected for viewing
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
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,47 @@ | ||
{% extends "layout.html" %} | ||
|
||
{% block pageTitle %} | ||
Example - Passing data | ||
{% endblock %} | ||
|
||
{% block beforeContent %} | ||
{% include "includes/breadcrumb_examples.html" %} | ||
{% endblock %} | ||
|
||
{% block content %} | ||
|
||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-two-thirds"> | ||
|
||
<form action="/docs/examples/pass-data/test2" method="post" class="form"> | ||
|
||
<div class="govuk-form-group"> | ||
<h3 class="govuk-label-wrapper"> | ||
Example as used in current docs | ||
</h3> | ||
<input class="govuk-input" id="registration-number" name="[claimant][field1]" value="{{ data['claimant']['field1'] }}" type="text"> | ||
<h3 class="govuk-label-wrapper"> | ||
Array of objects within object | ||
</h3> | ||
<input class="govuk-input" id="registration-number" name="[myObject][myArrayOfObjects][0][name]" value="{{ data['myObject']['myArrayOfObjects'][0]['name'] }}" type="text"> | ||
<h3 class="govuk-label-wrapper"> | ||
Simple array within object | ||
</h3> | ||
<input class="govuk-input" id="registration-number" name="[myObject][mySimpleArray][0]" value="{{ data['myObject']['mySimpleArray'][0] }}" type="text"> | ||
<h3 class="govuk-label-wrapper"> | ||
Multi-level array within object | ||
</h3> | ||
<input class="govuk-input" id="registration-number" name="[myObject][myMultiLevelArray][0][0][0]" value="{{ data['myObject']['myMultiLevelArray'][0][0][0] }}" type="text"> | ||
<h3 class="govuk-label-wrapper"> | ||
Arrays within array | ||
</h3> | ||
<input class="govuk-input" id="registration-number" name="[myArray][0][0]" value="{{ data['myArray'][0][0] }}" type="text"> | ||
</div> | ||
|
||
<button class="govuk-button">Continue</button> | ||
|
||
</form> | ||
|
||
</div> | ||
</div> | ||
{% endblock %} |
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 @@ | ||
{% extends "layout.html" %} | ||
|
||
{% block pageTitle %} | ||
Check your answers | ||
{% endblock %} | ||
|
||
{% block content %} | ||
|
||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-two-thirds"> | ||
|
||
<h3>Example as used in current docs</h3> | ||
{{ data['claimant']['field1'] }} | ||
{{ data['claimant']['field2'] }} | ||
<br> | ||
<br> | ||
<h3>Array of objects within object</h3> | ||
{{ data['myObject']['myArrayOfObjects'][0]['name'] }} | ||
{{ data['myObject']['myArrayOfObjects'][0]['address'] }} | ||
{{ data['myObject']['myArrayOfObjects'][1]['name'] }} | ||
<br> | ||
<br> | ||
<h3>Simple array within object</h3> | ||
{{ data['myObject']['mySimpleArray'][0] }} | ||
{{ data['myObject']['mySimpleArray'][1] }} | ||
<br> | ||
<br> | ||
<h3>Multi-level array within object</h3> | ||
{{ data['myObject']['myMultiLevelArray'][0][0][0] }} | ||
{{ data['myObject']['myMultiLevelArray'][0][0][1] }} | ||
{{ data['myObject']['myMultiLevelArray'][0][1] }} | ||
<br> | ||
<br> | ||
<h3>Arrays within array</h3> | ||
{{ data['myArray'][0][0] }} | ||
{{ data['myArray'][0][1][0] }} | ||
{{ data['myArray'][0][1][1] }} | ||
</div> | ||
|
||
</div> | ||
|
||
{% endblock %} |