Skip to content

Commit

Permalink
MDL-56800 theme_boost: Clean up rendering of the radio buttons
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mudrd8mz committed Nov 24, 2016
1 parent edd8370 commit c03f1de
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
7 changes: 3 additions & 4 deletions theme/boost/templates/core_form/element-radio-inline.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@
Example context (json):
{
"element": {
"id": "test-radio",
"name": "Test radio button",
"size": "10"
"id": "id_test_radio0",
"name": "test_radio_button"
}
}

}}
<label class="form-check-inline {{#error}}has-danger{{/error}} fitem {{#advanced}}advanced{{/advanced}} {{{element.extraclasses}}}">
<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.frozen}}disabled{{/element.frozen}}
{{#error}}
Expand Down
7 changes: 3 additions & 4 deletions theme/boost/templates/core_form/element-radio.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
Example context (json):
{
"element": {
"id": "test-radio",
"name": "Test radio button",
"size": "10"
"id": "id_test_radio0",
"name": "test_radio_button"
}
}

Expand All @@ -15,7 +14,7 @@
<div class="col-md-9 push-md-3 checkbox">
<label>
<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.frozen}}disabled{{/element.frozen}}
{{#error}}
Expand Down

0 comments on commit c03f1de

Please sign in to comment.