2 This file is part of Moodle - http://moodle.org/
4 Moodle is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
9 Moodle is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with Moodle. If not, see <http://www.gnu.org/licenses/>.
18 @template core_form/element-template
20 Template for the form element wrapper template.
22 Context variables required for this template:
32 Example context (json):
34 "label": "Course full name",
39 "wrapperid": "fitem_id_fullname",
45 <div id="{{element.wrapperid}}" class="form-group row {{#error}}has-danger{{/error}} fitem {{#element.emptylabel}}femptylabel{{/element.emptylabel}} {{#advanced}}advanced{{/advanced}} {{{element.extraclasses}}}" {{#element.groupname}}data-groupname="{{.}}"{{/element.groupname}}>
46 <div class="col-md-3">
47 <span class="float-sm-right text-nowrap">
48 {{#required}}<abbr class="initialism text-danger" title="{{#str}}required{{/str}}">{{#pix}}req, core, {{#str}}required{{/str}}{{/pix}}</abbr>{{/required}}
49 {{#advanced}}<abbr class="initialism text-info" title="{{#str}}advanced{{/str}}">!</abbr>{{/advanced}}
52 {{# label}}{{$ label }}
53 {{^element.staticlabel}}
54 <label class="col-form-label d-inline {{#element.hiddenlabel}}sr-only{{/element.hiddenlabel}}" for="{{element.id}}">
57 {{/element.staticlabel}}
58 {{#element.staticlabel}}
59 <span class="col-form-label d-inline-block {{#element.hiddenlabel}}sr-only{{/element.hiddenlabel}}">
62 {{/element.staticlabel}}
63 {{/ label }}{{/ label}}
65 <div class="col-md-9 form-inline felement" data-fieldtype="{{element.type}}">
67 <!-- Element goes here -->
69 <div class="form-control-feedback invalid-feedback" id="{{element.iderror}}" {{#error}} style="display: block;"{{/error}}>
75 require(['theme_boost/form-display-errors'], function(module) {
76 module.enhance({{#quote}}{{element.id}}{{/quote}});