MDL-56800 theme_boost: Remove name from hardFrozen radio
[moodle.git] / theme / boost / templates / core_form / element-radio-inline.mustache
1 {{!
2 @template theme_boost/core_form/element-radio-online
4    Example context (json):
5    {
6     "element": {
7         "id": "id_test_radio0",
8         "name": "test_radio_button"
9       }
10    }
12 }}
13 <label class="form-check-inline {{#error}}has-danger{{/error}} fitem {{#advanced}}advanced{{/advanced}} {{{element.extraclasses}}}">
14 {{^element.hardfrozen}}{{#element.frozen}}{{#element.checked}}
15     <input type="hidden" name="{{element.name}}" value="{{element.value}}">
16 {{/element.checked}}{{/element.frozen}}{{/element.hardfrozen}}
17 <input type="radio" {{^element.hardfrozen}}name="{{element.name}}"{{/element.hardfrozen}}
18     id="{{element.id}}" value="{{element.value}}"
19     {{#element.checked}}checked{{/element.checked}}
20     {{#element.frozen}}disabled{{/element.frozen}}
21     {{#error}}
22         autofocus aria-describedby="id_error_{{element.name}}"
23     {{/error}}
24     {{{element.attributes}}} >
25     {{{label}}}
26 </label>
27 {{#text}}
28     <em>{{{.}}}</em>
29 {{/text}}
30 {{{helpbutton}}}
31 <span class="form-control-feedback" id="id_error_{{element.name}}" {{^error}} style="display: none;"{{/error}}>
32     {{{error}}}
33 </span>
34 {{^element.frozen}}
35 {{#js}}
36 require(['theme_boost/form-display-errors'], function(module) {
37     module.enhance({{#quote}}{{element.id}}{{/quote}});
38 });
39 {{/js}}
40 {{/element.frozen}}