MDL-56462 boost: Fix assign grading options form
[moodle.git] / theme / boost / templates / core_form / element-checkbox.mustache
1 <div class="form-group row {{#error}}has-danger{{/error}} fitem {{#advanced}}advanced{{/advanced}} {{{element.extraclasses}}}">
2     <div class="col-md-9 push-md-3 checkbox">
3         <label>
4         {{^element.hardfrozen}}
5             {{#element.frozen}}
6                 <input type="hidden" name="{{element.name}}" value="{{element.frozenvalue}}">
7             {{/element.frozen}}
8         {{/element.hardfrozen}}
9         <input type="checkbox"
10             name="{{element.name}}"
11             {{#element.value}}
12                 value="{{element.value}}"
13             {{/element.value}}
14             {{^element.value}}
15                 value="1"
16             {{/element.value}}
17             id="{{element.id}}" {{#element.checked}}checked{{/element.checked}}
18             {{#error}}
19                 autofocus aria-describedby="id_error_{{element.name}}"
20             {{/error}}
21             {{#element.frozen}}
22                 disabled
23             {{/element.frozen}}
24             {{{element.attributes}}} >
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}}