MDL-55656 theme_noname: Include advanced and required field markup
[moodle.git] / theme / noname / templates / core_form / element-template.mustache
1 <div class="form-group row {{#error}}has-danger{{/error}} fitem {{#advanced}}advanced{{/advanced}}">
2     <label class="col-md-3 col-form-label {{#element.hiddenlabel}}sr-only{{/element.hiddenlabel}}" for="{{element.id}}">
3         {{{label}}}
4         <span class="pull-xs-right">
5         {{{helpbutton}}}
6         {{#required}}<abbr class="initialism text-danger" title="{{#str}}required{{/str}}">✲</abbr>{{/required}}
7         {{#advanced}}<abbr class="initialism text-info" title="{{#str}}advanced{{/str}}">❗</abbr>{{/advanced}}
8         </span>
9     </label>
10     <div class="col-md-9 form-inline felement">
11         {{$ element }}
12             <!-- Element goes here -->
13         {{/ element }}
14         <div class="form-control-feedback" id="id_error_{{element.name}}" {{^error}} style="display: none;"{{/error}}>
15             {{{error}}}
16         </div>
17     </div>
18 </div>
19 {{#js}}
20 require(['theme_noname/form-display-errors'], function(module) {
21     module.enhance({{#quote}}{{element.id}}{{/quote}});
22 });
23 {{/js}}