Commit 032674ee authored by Marina Glancy's avatar Marina Glancy
Browse files

MDL-59775 forms: add femptylabel class to els without labels

This class was present in clean/more but was forgotted in boost
parent 32f9550e
......@@ -81,6 +81,7 @@ trait templatable_form_element {
$context['extraclasses'] = $extraclasses;
$context['type'] = $this->getType();
$context['attributes'] = implode(' ', $otherattributes);
$context['emptylabel'] = ($this->getLabel() === '');
// Elements with multiple values need array syntax.
if ($this->getAttribute('multiple')) {
......
......@@ -41,7 +41,7 @@
}
}
}}
<div class="form-group row {{#error}}has-danger{{/error}} fitem {{#advanced}}advanced{{/advanced}} {{{element.extraclasses}}}" {{#element.groupname}}data-groupname="{{.}}"{{/element.groupname}}>
<div 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}}>
<div class="col-md-3">
<span class="pull-xs-right text-nowrap">
{{#required}}<abbr class="initialism text-danger" title="{{#str}}required{{/str}}">{{#pix}}req, core, {{#str}}required{{/str}}{{/pix}}</abbr>{{/required}}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment