MDL-56800 theme_boost: Clean up rendering of the radio buttons

The <input type="radio"> element does not support the size attribute so
there is no point of rendering it. Also fixed the example data as the
field name must not contain any whitespace.
This commit is contained in:
David Mudrák 2016-11-24 23:50:21 +01:00
parent edd837038a
commit c03f1de198
2 changed files with 6 additions and 8 deletions

View File

@ -4,16 +4,15 @@
Example context (json): Example context (json):
{ {
"element": { "element": {
"id": "test-radio", "id": "id_test_radio0",
"name": "Test radio button", "name": "test_radio_button"
"size": "10"
} }
} }
}} }}
<label class="form-check-inline {{#error}}has-danger{{/error}} fitem {{#advanced}}advanced{{/advanced}} {{{element.extraclasses}}}"> <label class="form-check-inline {{#error}}has-danger{{/error}} fitem {{#advanced}}advanced{{/advanced}} {{{element.extraclasses}}}">
<input type="radio" name="{{element.name}}" <input type="radio" name="{{element.name}}"
id="{{element.id}}" value="{{element.value}}" size="{{element.size}}" id="{{element.id}}" value="{{element.value}}"
{{#element.checked}}checked{{/element.checked}} {{#element.checked}}checked{{/element.checked}}
{{#element.frozen}}disabled{{/element.frozen}} {{#element.frozen}}disabled{{/element.frozen}}
{{#error}} {{#error}}

View File

@ -4,9 +4,8 @@
Example context (json): Example context (json):
{ {
"element": { "element": {
"id": "test-radio", "id": "id_test_radio0",
"name": "Test radio button", "name": "test_radio_button"
"size": "10"
} }
} }
@ -15,7 +14,7 @@
<div class="col-md-9 push-md-3 checkbox"> <div class="col-md-9 push-md-3 checkbox">
<label> <label>
<input type="radio" name="{{element.name}}" <input type="radio" name="{{element.name}}"
id="{{element.id}}" value="{{element.value}}" size="{{element.size}}" id="{{element.id}}" value="{{element.value}}"
{{#element.checked}}checked{{/element.checked}} {{#element.checked}}checked{{/element.checked}}
{{#element.frozen}}disabled{{/element.frozen}} {{#element.frozen}}disabled{{/element.frozen}}
{{#error}} {{#error}}