019855d6874364027a8bbe1f72819fa1fad869fd
[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 <input type="radio" name="{{element.name}}"
15     id="{{element.id}}" value="{{element.value}}"
16     {{#element.checked}}checked{{/element.checked}}
17     {{#element.frozen}}disabled{{/element.frozen}}
18     {{#error}}
19         autofocus aria-describedby="id_error_{{element.name}}"
20     {{/error}}
21     {{{element.attributes}}} >
22     {{{label}}}
23 </label>
24 {{#text}}
25     <em>{{{.}}}</em>
26 {{/text}}
27 {{{helpbutton}}}
28 <span class="form-control-feedback" id="id_error_{{element.name}}" {{^error}} style="display: none;"{{/error}}>
29     {{{error}}}
30 </span>
31 {{^element.frozen}}
32 {{#js}}
33 require(['theme_boost/form-display-errors'], function(module) {
34     module.enhance({{#quote}}{{element.id}}{{/quote}});
35 });
36 {{/js}}
37 {{/element.frozen}}