MDL-55656 theme_noname: Include advanced and required field markup
[moodle.git] / theme / noname / templates / core_form / element-template.mustache
CommitLineData
d6f2ce14 1<div class="form-group row {{#error}}has-danger{{/error}} fitem {{#advanced}}advanced{{/advanced}}">
344321e1 2 <label class="col-md-3 col-form-label {{#element.hiddenlabel}}sr-only{{/element.hiddenlabel}}" for="{{element.id}}">
d6f2ce14
DW
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>
344321e1 9 </label>
c1d6e95b 10 <div class="col-md-9 form-inline felement">
344321e1
DW
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}}
4691b2d0
DW
20require(['theme_noname/form-display-errors'], function(module) {
21 module.enhance({{#quote}}{{element.id}}{{/quote}});
344321e1 22});
bffc0ef1 23{{/js}}