MDL-68353 form: filemanager label fix
[moodle.git] / lib / form / templates / element-filemanager.mustache
CommitLineData
344321e1 1{{< core_form/element-template }}
f792b0ac
SR
2 {{$label}}
3 {{^element.hiddenlabel}}
4 <p id="{{element.id}}_label" class="col-form-label d-inline" aria-hidden="true">
5 {{{label}}}
6 </p>
7 {{/element.hiddenlabel}}
8 {{/label}}
344321e1 9 {{$element}}
f792b0ac
SR
10 <fieldset class="w-100 m-0 p-0 border-0" id="{{element.id}}_fieldset">
11 <legend class="sr-only">{{label}}</legend>
12 {{{element.html}}}
13 </fieldset>
344321e1 14 {{/element}}
63e4df60 15{{/ core_form/element-template }}
f792b0ac
SR
16{{#js}}
17(function() {
18 var label = document.getElementById('{{element.id}}_label');
19 if (label) {
20 label.style.cursor = 'default';
21 label.addEventListener('click', function() {
22 document.querySelectorAll('#{{element.id}}_fieldset div.fp-toolbar a')[0].focus();
23 });
24 }
25})();
26{{/js}}