MDL-69453 core_form: improve form UI icons and alignment
[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 data-fieldtype="{{element.type}}">
8         {{$ element }}
9             <!-- Element goes here -->
10         {{/ element }}
11     </span>
12     <div class="form-control-feedback invalid-feedback" id="{{element.iderror}}" {{#error}} style="display: block;"{{/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}}