weekly release 3.2dev
[moodle.git] / theme / boost / templates / core_form / element-template.mustache
1 <div class="form-group row {{#error}}has-danger{{/error}} fitem {{#advanced}}advanced{{/advanced}} {{{element.extraclasses}}}">
2     <div class="col-md-3">
3         <label class="col-form-label {{#element.hiddenlabel}}sr-only{{/element.hiddenlabel}}" for="{{element.id}}">
4             {{{label}}}
5         </label>
6         <span class="pull-xs-right">
7             {{#required}}<abbr class="initialism text-danger" title="{{#str}}required{{/str}}">✲</abbr>{{/required}}
8             {{#advanced}}<abbr class="initialism text-info" title="{{#str}}advanced{{/str}}">❗</abbr>{{/advanced}}
9             {{{helpbutton}}}
10         </span>
11     </div>
12     <div class="col-md-9 form-inline felement" data-fieldtype="{{element.type}}">
13         {{$ element }}
14             <!-- Element goes here -->
15         {{/ element }}
16         <div class="form-control-feedback" id="id_error_{{element.name}}" {{^error}} style="display: none;"{{/error}}>
17             {{{error}}}
18         </div>
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}}