Skip to content

Commit

Permalink
Wrap checkbox and radio examples in a form
Browse files Browse the repository at this point in the history
Javascript doesn't know how to unselect our elements unless
they're contained within a form.

Since @tombye added a `surrounding_html` key, now we can
add this to our examples.
  • Loading branch information
pcraig3 committed Feb 10, 2017
1 parent 57bd01a commit adbd05b
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions pages_builder/pages/forms/selection-buttons.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ examples:
label : Month
-
label : Year
surrounding_html:
<form>
{{ example | safe }}
</form>
-
type: radio
name: serviceStatus
Expand All @@ -31,6 +35,10 @@ examples:
label: Public
-
label: Private
surrounding_html:
<form>
{{ example | safe }}
</form>
-
type: checkbox
name: categories
Expand All @@ -45,12 +53,20 @@ examples:
label: Business intelligence and analytics
-
label: Collaboration
surrounding_html:
<form>
{{ example | safe }}
</form>
-
type: boolean
question: Offline working supported
name: offlineWorking
value: True
question_number: '19'
surrounding_html:
<form>
{{ example | safe }}
</form>
-
type: radio
question: Checkbox with hint and option description
Expand All @@ -63,6 +79,10 @@ examples:
Infrastructure is the hardware that makes software work. It's the networks, hosting facilities
and servers that platforms and software depend on. IaaS is infrastructure you can order and run
entirely over the internet, without having to pay for your own hardware.
surrounding_html:
<form>
{{ example | safe }}
</form>
-
type: radio
question: Optional radios with question advice, hint and option description
Expand All @@ -77,6 +97,10 @@ examples:
Infrastructure is the hardware that makes software work. It's the networks, hosting facilities
and servers that platforms and software depend on. IaaS is infrastructure you can order and run
entirely over the internet, without having to pay for your own hardware.
surrounding_html:
<form>
{{ example | safe }}
</form>
-
type: radio
question: Checkbox with hint, question description and option description
Expand All @@ -90,6 +114,10 @@ examples:
Infrastructure is the hardware that makes software work. It's the networks, hosting facilities
and servers that platforms and software depend on. IaaS is infrastructure you can order and run
entirely over the internet, without having to pay for your own hardware.
surrounding_html:
<form>
{{ example | safe }}
</form>
-
type: checkbox
question: Is your service assured by
Expand All @@ -103,6 +131,10 @@ examples:
label: independent validation of assertion?
-
label: independent testing of implementation?
surrounding_html:
<form>
{{ example | safe }}
</form>
-
type: checkbox
name: vegetables
Expand All @@ -116,6 +148,10 @@ examples:
label: Onion
-
label: Collaboration
surrounding_html:
<form>
{{ example | safe }}
</form>
-
type: checkbox
name: dont
Expand Down Expand Up @@ -164,6 +200,10 @@ examples:
label: Don’t
-
label: Don’t
surrounding_html:
<form>
{{ example | safe }}
</form>
-
type: boolean
name: requirement
Expand Down

0 comments on commit adbd05b

Please sign in to comment.