MDL-56462 boost: Fix assign grading options form
[moodle.git] / theme / boost / templates / core_form / element-radio.mustache
1 {{!
2     @template theme_boost/core_form/element-radio
4     Example context (json):
5     {
6         "element": {
7             "id": "test-radio",
8             "name": "Test radio button",
9             "size": "10"
10         }
11     }
13 }}
14 <div class="form-group row {{#error}}has-danger{{/error}} fitem {{#advanced}}advanced{{/advanced}} {{{element.extraclasses}}}">
15     <div class="col-md-9 push-md-3 checkbox">
16         <label>
17         {{^element.frozen}}
18         <input type="radio" name="{{element.name}}"
19             id="{{element.id}}" value="{{element.value}}" size="{{element.size}}"
20             {{#element.checked}}checked{{/element.checked}}
21             {{#error}}
22                 autofocus aria-describedby="id_error_{{element.name}}"
23             {{/error}} {{{element.attributes}}} >
24         {{/element.frozen}}
25             {{{label}}}
26         </label> {{{helpbutton}}}
27         <div class="form-control-feedback" id="id_error_{{element.name}}" {{^error}} style="display: none;"{{/error}}>
28             {{{error}}}
29         </div>
30     </div>
31 </div>
32 {{^element.frozen}}
33 {{#js}}
34 require(['theme_boost/form-display-errors'], function(module) {
35     module.enhance({{#quote}}{{element.id}}{{/quote}});
36 });
37 {{/js}}
38 {{/element.frozen}}