MDL-55417 theme_noname: Update mform templates to re-use javascript
[moodle.git] / theme / noname / templates / core_form / element-checkbox-inline.mustache
1 <label class="form-check-inline {{#error}}has-danger{{/error}}">
2 <input type="checkbox" name="{{element.name}}"
3     id="{{element.id}}" value="{{element.value}}" size="{{element.size}}"
4     {{#element.frozen}}readonly disabled{{/element.frozen}}
5     {{#error}}
6         autofocus aria-describedby="id_error_{{element.name}}"
7     {{/error}}
8     {{{element.attributes}}} >
9     {{{label}}} {{{helpbutton}}}
10 </label>
11 <span class="form-control-feedback" id="id_error_{{element.name}}" {{^error}} style="display: none;"{{/error}}>
12     {{{error}}}
13 </span>
14 {{#js}}
15 require(['theme_noname/form-display-errors'], function(module) {
16     module.enhance({{#quote}}{{element.id}}{{/quote}});
17 });
18 {{/js}}