MDL-56161 boost: add missing example context
[moodle.git] / theme / boost / templates / core_form / element-template.mustache
CommitLineData
63e4df60
DW
1<div class="form-group row {{#error}}has-danger{{/error}} fitem {{#advanced}}advanced{{/advanced}} {{{element.extraclasses}}}">
2 <div class="col-md-3">
9e2f1312 3 {{^element.staticlabel}}
63e4df60
DW
4 <label class="col-form-label {{#element.hiddenlabel}}sr-only{{/element.hiddenlabel}}" for="{{element.id}}">
5 {{{label}}}
6 </label>
9e2f1312
DW
7 {{/element.staticlabel}}
8 {{#element.staticlabel}}
9 <span class="col-form-label d-inline-block {{#element.hiddenlabel}}sr-only{{/element.hiddenlabel}}">
10 {{{label}}}
11 </span>
12 {{/element.staticlabel}}
4821f459 13 <span class="pull-xs-right text-nowrap">
63e4df60
DW
14 {{#required}}<abbr class="initialism text-danger" title="{{#str}}required{{/str}}">✲</abbr>{{/required}}
15 {{#advanced}}<abbr class="initialism text-info" title="{{#str}}advanced{{/str}}">❗</abbr>{{/advanced}}
16 {{{helpbutton}}}
d6f2ce14 17 </span>
4821f459
DW
18 <label class="col-form-label d-inline {{#element.hiddenlabel}}sr-only{{/element.hiddenlabel}}" for="{{element.id}}">
19 {{{label}}}
20 </label>
63e4df60
DW
21 </div>
22 <div class="col-md-9 form-inline felement" data-fieldtype="{{element.type}}">
344321e1
DW
23 {{$ element }}
24 <!-- Element goes here -->
25 {{/ element }}
26 <div class="form-control-feedback" id="id_error_{{element.name}}" {{^error}} style="display: none;"{{/error}}>
27 {{{error}}}
28 </div>
29 </div>
30</div>
31{{#js}}
2ede86d7 32require(['theme_boost/form-display-errors'], function(module) {
4691b2d0 33 module.enhance({{#quote}}{{element.id}}{{/quote}});
344321e1 34});
bffc0ef1 35{{/js}}