Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PLATUI-2916: Add beforeInput(s) and afterInput(s) options to form gro…
…ups in play-frontend (#297)
- Loading branch information
1 parent
57a2517
commit 4b01f1d
Showing
60 changed files
with
730 additions
and
37 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
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
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
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
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
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
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
3 changes: 3 additions & 0 deletions
3
...d/additional-fixtures/character-count-with-beforeInput-and-afterInput-html/component.json
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,3 @@ | ||
{ | ||
"name" : "govukCharacterCount" | ||
} |
16 changes: 16 additions & 0 deletions
16
...ntend/additional-fixtures/character-count-with-beforeInput-and-afterInput-html/input.json
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,16 @@ | ||
{ | ||
"id" : "with-formgroup", | ||
"name" : "with-formgroup", | ||
"maxlength" : 10, | ||
"label" : { | ||
"text" : "With formgroup" | ||
}, | ||
"formGroup" : { | ||
"beforeInput": { "html": "<p>test before</p>"}, | ||
"afterInput": { "html": "<p>test after</p>"}, | ||
"attributes" : { | ||
"some-data-attribute": "true", | ||
"some-other-data-attribute": "eleven" | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
...ntend/additional-fixtures/character-count-with-beforeInput-and-afterInput-html/output.txt
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,11 @@ | ||
<div class="govuk-form-group govuk-character-count" data-module="govuk-character-count" data-maxlength="10" some-data-attribute="true" some-other-data-attribute="eleven"> | ||
<label class="govuk-label" for="with-formgroup"> | ||
With formgroup | ||
</label> | ||
<p>test before</p> | ||
<textarea class="govuk-textarea govuk-js-character-count" id="with-formgroup" name="with-formgroup" rows="5" aria-describedby="with-formgroup-info"></textarea> | ||
<div id="with-formgroup-info" class="govuk-hint govuk-character-count__message"> | ||
You can enter up to 10 characters | ||
</div> | ||
<p>test after</p> | ||
</div> |
3 changes: 3 additions & 0 deletions
3
...d/additional-fixtures/character-count-with-beforeInput-and-afterInput-text/component.json
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,3 @@ | ||
{ | ||
"name" : "govukCharacterCount" | ||
} |
16 changes: 16 additions & 0 deletions
16
...ntend/additional-fixtures/character-count-with-beforeInput-and-afterInput-text/input.json
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,16 @@ | ||
{ | ||
"id" : "with-formgroup", | ||
"name" : "with-formgroup", | ||
"maxlength" : 10, | ||
"label" : { | ||
"text" : "With formgroup" | ||
}, | ||
"formGroup" : { | ||
"beforeInput": { "text": "test before"}, | ||
"afterInput": { "text": "test after"}, | ||
"attributes" : { | ||
"some-data-attribute": "true", | ||
"some-other-data-attribute": "eleven" | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
...ntend/additional-fixtures/character-count-with-beforeInput-and-afterInput-text/output.txt
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,11 @@ | ||
<div class="govuk-form-group govuk-character-count" data-module="govuk-character-count" data-maxlength="10" some-data-attribute="true" some-other-data-attribute="eleven"> | ||
<label class="govuk-label" for="with-formgroup"> | ||
With formgroup | ||
</label> | ||
test before | ||
<textarea class="govuk-textarea govuk-js-character-count" id="with-formgroup" name="with-formgroup" rows="5" aria-describedby="with-formgroup-info"></textarea> | ||
<div id="with-formgroup-info" class="govuk-hint govuk-character-count__message"> | ||
You can enter up to 10 characters | ||
</div> | ||
test after | ||
</div> |
3 changes: 3 additions & 0 deletions
3
...ontend/additional-fixtures/checkboxes-with-beforeInput-and-afterInput-html/component.json
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,3 @@ | ||
{ | ||
"name" : "govukCheckboxes" | ||
} |
37 changes: 37 additions & 0 deletions
37
...k-frontend/additional-fixtures/checkboxes-with-beforeInput-and-afterInput-html/input.json
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,37 @@ | ||
{ | ||
"name" : "how-contacted-checked", | ||
"idPrefix" : "how-contacted-checked", | ||
"formGroup" : { | ||
"beforeInputs": { "html": "<p>test before</p>"}, | ||
"afterInputs": { "html": "<p>test after</p>"}, | ||
"attributes" : { | ||
"some-data-attribute": "true", | ||
"some-other-data-attribute": "eleven" | ||
} | ||
}, | ||
"fieldset" : { | ||
"legend" : { | ||
"text" : "How do you want to be contacted?" | ||
} | ||
}, | ||
"items" : [ { | ||
"value" : "email", | ||
"text" : "Email", | ||
"conditional" : { | ||
"html" : "<label class=\"govuk-label\" for=\"context-email\">Email address</label>\n<input class=\"govuk-input govuk-!-width-one-third\" name=\"context-email\" type=\"text\" id=\"context-email\">\n" | ||
} | ||
}, { | ||
"value" : "phone", | ||
"text" : "Phone", | ||
"checked" : true, | ||
"conditional" : { | ||
"html" : "<label class=\"govuk-label\" for=\"contact-phone\">Phone number</label>\n<span id=\"contact-phone-error\" class=\"govuk-error-message\">Problem with input</span>\n<input class=\"govuk-input govuk-input--error govuk-!-width-one-third\" name=\"contact-phone\" type=\"text\" id=\"contact-phone\" aria-describedby=\"contact-phone-error\">\n" | ||
} | ||
}, { | ||
"value" : "text", | ||
"text" : "Text message", | ||
"conditional" : { | ||
"html" : "<label class=\"govuk-label\" for=\"contact-text-message\">Mobile phone number</label>\n<input class=\"govuk-input govuk-!-width-one-third\" name=\"contact-text-message\" type=\"text\" id=\"contact-text-message\">\n" | ||
} | ||
} ] | ||
} |
Oops, something went wrong.