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