weekly release 3.3dev
[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">
ebdd54f4
DP
3 <span class="pull-xs-right text-nowrap">
4 {{#required}}<abbr class="initialism text-danger" title="{{#str}}required{{/str}}">✲</abbr>{{/required}}
d91cbe1e 5 {{#advanced}}<abbr class="initialism text-info" title="{{#str}}advanced{{/str}}">!</abbr>{{/advanced}}
ebdd54f4
DP
6 {{{helpbutton}}}
7 </span>
9e2f1312 8 {{^element.staticlabel}}
ebdd54f4 9 <label class="col-form-label d-inline {{#element.hiddenlabel}}sr-only{{/element.hiddenlabel}}" for="{{element.id}}">
63e4df60
DW
10 {{{label}}}
11 </label>
9e2f1312
DW
12 {{/element.staticlabel}}
13 {{#element.staticlabel}}
14 <span class="col-form-label d-inline-block {{#element.hiddenlabel}}sr-only{{/element.hiddenlabel}}">
15 {{{label}}}
16 </span>
17 {{/element.staticlabel}}
63e4df60
DW
18 </div>
19 <div class="col-md-9 form-inline felement" data-fieldtype="{{element.type}}">
344321e1
DW
20 {{$ element }}
21 <!-- Element goes here -->
22 {{/ element }}
23 <div class="form-control-feedback" id="id_error_{{element.name}}" {{^error}} style="display: none;"{{/error}}>
24 {{{error}}}
25 </div>
26 </div>
27</div>
28{{#js}}
2ede86d7 29require(['theme_boost/form-display-errors'], function(module) {
4691b2d0 30 module.enhance({{#quote}}{{element.id}}{{/quote}});
344321e1 31});
bffc0ef1 32{{/js}}