MDL-59749 form: revert setting id on inline form elements

Revert the change I made in MDL-59382 to correctly set the id for inline
form elements because it's breaking a bunch of different places that had
already worked around the problem.
This commit is contained in:
Ryan Wyllie 2017-08-08 03:28:36 +00:00
parent 8146b1f06d
commit 0a501e1b2e
2 changed files with 1 additions and 2 deletions

View File

@ -78,7 +78,6 @@ trait templatable_form_element {
$otherattributes[] = $attr . '="' . s($value) . '"';
}
}
$context['name'] = $context['name'] ?: $this->getName();
$context['extraclasses'] = $extraclasses;
$context['type'] = $this->getType();
$context['attributes'] = implode(' ', $otherattributes);

View File

@ -4,7 +4,7 @@
{{#required}}<abbr class="initialism text-danger" title="{{#str}}required{{/str}}">{{#pix}}req, core, {{#str}}required{{/str}}{{/pix}}</abbr>{{/required}}
{{#advanced}}<abbr class="initialism text-info" title="{{#str}}advanced{{/str}}">!</abbr>{{/advanced}}
</label>
<span id="{{element.id}}" data-fieldtype="{{element.type}}">
<span data-fieldtype="{{element.type}}">
{{$ element }}
<!-- Element goes here -->
{{/ element }}