weekly release 4.0dev
[moodle.git] / lib / form / templates / element-advcheckbox.mustache
CommitLineData
58488d0f 1<div class="form-group row {{#error}}has-danger{{/error}} fitem {{#advanced}}advanced{{/advanced}} {{{element.extraclasses}}}">
dc801cb6
MN
2 <div class="col-md-3">
3 {{#text}}
4 <label for="{{element.id}}">
5 {{{label}}}
6 </label>
7 {{/text}}
8 </div>
9 <div class="col-md-9 checkbox">
4d181caf 10 <div class="form-check d-flex">
3ec69c2e
BB
11 {{^element.hardfrozen}}
12 {{^element.frozen}}
13 <input type="hidden" name="{{element.name}}" value="{{element.deselectedvalue}}">
14 {{/element.frozen}}
15 {{#element.frozen}}
16 <input type="hidden" name="{{element.name}}" value="{{element.frozenvalue}}">
17 {{/element.frozen}}
18 {{/element.hardfrozen}}
19 <input type="checkbox"
20 name="{{element.name}}"
21 class="form-check-input {{element.extraclasses}}"
22 {{#element.selectedvalue}}
23 value="{{element.selectedvalue}}"
24 {{/element.selectedvalue}}
25 id="{{element.id}}" {{#element.checked}}checked{{/element.checked}}
26 {{#error}}
e3457dc4
JP
27 autofocus aria-describedby="{{#text}}{{element.id}}_description {{/text}}{{element.iderror}}"
28 {{/error}}
29 {{^error}}
30 {{#text}}
31 aria-describedby="{{element.id}}_description"
32 {{/text}}
3ec69c2e
BB
33 {{/error}}
34 {{#element.frozen}}
35 disabled
36 {{/element.frozen}}
37 {{{element.attributes}}} >
e3457dc4
JP
38 {{#text}}
39 <span id="{{element.id}}_description">
3ec69c2e 40 {{{.}}}
e3457dc4
JP
41 </span>
42 {{/text}}
43 {{^text}}
44 <label for="{{element.id}}">
3ec69c2e 45 {{{label}}}
e3457dc4
JP
46 </label>
47 {{/text}}
1d685419 48 <div class="ml-2 d-flex align-items-center align-self-start">
4d181caf
BB
49 {{#required}}
50 <div class="text-danger" title="{{#str}}required{{/str}}">
51 {{#pix}}req, core, {{#str}}required{{/str}}{{/pix}}
52 </div>
53 {{/required}}
3ec69c2e 54 {{{helpbutton}}}
1d685419 55 </div>
3ec69c2e 56 </div>
521989ec 57 <div class="form-control-feedback invalid-feedback" id="{{element.iderror}}" {{#error}} style="display: block;"{{/error}}>
63e4df60
DW
58 {{{error}}}
59 </div>
60 </div>
61</div>
62{{^element.frozen}}
63{{#js}}
2ede86d7 64require(['theme_boost/form-display-errors'], function(module) {
63e4df60
DW
65 module.enhance({{#quote}}{{element.id}}{{/quote}});
66});
67{{/js}}
68{{/element.frozen}}