MDL-69422 core: Convert required and help button container to div
authorJun Pataleta <jun@moodle.com>
Mon, 23 Nov 2020 17:02:50 +0000 (01:02 +0800)
committerJun Pataleta <jun@moodle.com>
Fri, 27 Nov 2020 15:24:13 +0000 (23:24 +0800)
* A span element cannot have a div as a child.

lib/form/templates/element-advcheckbox.mustache
lib/form/templates/element-checkbox.mustache
lib/form/templates/element-radio.mustache
lib/form/templates/element-template.mustache

index d64ad69..7524c00 100644 (file)
                     {{{label}}}
                 {{/text}}
             </label>
-            <span class="ml-2 d-flex align-items-center align-self-start">
+            <div class="ml-2 d-flex align-items-center align-self-start">
                 {{#required}}
                     <div class="text-danger" title="{{#str}}required{{/str}}">
                     {{#pix}}req, core, {{#str}}required{{/str}}{{/pix}}
                     </div>
                 {{/required}}
                 {{{helpbutton}}}
-            </span>
+            </div>
         </div>
         <div class="form-control-feedback invalid-feedback" id="{{element.iderror}}" {{#error}} style="display: block;"{{/error}}>
             {{{error}}}
index 4aacd4f..b3497a4 100644 (file)
                     {{{label}}}
                 {{/text}}
             </label>
-            <span class="ml-2 d-flex align-items-center align-self-start">
+            <div class="ml-2 d-flex align-items-center align-self-start">
                 {{#required}}
                     <div class="text-danger" title="{{#str}}required{{/str}}">
                     {{#pix}}req, core, {{#str}}required{{/str}}{{/pix}}
                     </div>
                 {{/required}}
                 {{{helpbutton}}}
-            </span>
+            </div>
         </div>
         <div class="form-control-feedback invalid-feedback" id="{{element.iderror}}" {{#error}} style="display: block;"{{/error}}>
             {{{error}}}
index 17e557e..0efeff5 100644 (file)
                         {{{label}}}
                     {{/text}}
                 </label>
-                <span class="ml-2 d-flex align-items-center align-self-start">
+                <div class="ml-2 d-flex align-items-center align-self-start">
                     {{#required}}
                         <div class="text-danger" title="{{#str}}required{{/str}}">
                         {{#pix}}req, core, {{#str}}required{{/str}}{{/pix}}
                         </div>
                     {{/required}}
                     {{{helpbutton}}}
-                </span>
+                </div>
         </div>
         <div class="form-control-feedback invalid-feedback" id="{{element.iderror}}" {{#error}} style="display: block;"{{/error}}>
             {{{error}}}
index afa6576..b77408b 100644 (file)
                 </span>
             {{/element.staticlabel}}
         {{/ label }}{{/ label}}
-        <span class="ml-1 ml-md-auto d-flex align-items-center align-self-start">
+        <div class="ml-1 ml-md-auto d-flex align-items-center align-self-start">
             {{#required}}
                 <div class="text-danger" title="{{#str}}required{{/str}}">
                 {{#pix}}req, core, {{#str}}required{{/str}}{{/pix}}
                 </div>
             {{/required}}
             {{{helpbutton}}}
-        </span>
+        </div>
     </div>
     <div class="col-md-9 form-inline align-items-start felement" data-fieldtype="{{element.type}}">
         {{$ element }}