88593fccdcbfe9f4d24fc7d80ded771286484e06
[moodle.git] / theme / boost / templates / core_form / element-template-inline.mustache
1 <div class="form-group {{#error}}has-danger{{/error}} fitem {{#advanced}}advanced{{/advanced}} {{{element.extraclasses}}}">
2     <label class="col-form-label {{#element.hiddenlabel}}sr-only{{/element.hiddenlabel}}" for="{{element.id}}">
3         {{{label}}} {{{helpbutton}}}
4         {{#required}}<abbr class="initialism text-danger" title="{{#str}}required{{/str}}">{{#pix}}req, core, {{#str}}required{{/str}}{{/pix}}</abbr>{{/required}}
5         {{#advanced}}<abbr class="initialism text-info" title="{{#str}}advanced{{/str}}">!</abbr>{{/advanced}}
6     </label>
7     <span data-fieldtype="{{element.type}}">
8         {{$ element }}
9             <!-- Element goes here -->
10         {{/ element }}
11     </span>
12     <div class="form-control-feedback" id="id_error_{{element.name}}" {{^error}} style="display: none;"{{/error}}>
13         {{{error}}}
14     </div>
15 </div>
16 {{#js}}
17 require(['theme_boost/form-display-errors'], function(module) {
18     module.enhance({{#quote}}{{element.id}}{{/quote}});
19 });
20 {{/js}}