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