OOUIHTMLForm: Don't output an empty hidden LabelWidget if not needed
authorFlorian <florian.schmidt.stargatewissen@gmail.com>
Sun, 8 May 2016 14:55:34 +0000 (16:55 +0200)
committerFlorian <florian.schmidt.stargatewissen@gmail.com>
Fri, 13 May 2016 19:30:22 +0000 (21:30 +0200)
commit8e5912aac37868cced1f8b4350e48455b7654645
tree04d37de5b5991c4397ee63b0e4e4c8b10a3e7f6f
parentbb6f05fc3e184614c32c47b60428e7d0f2665159
OOUIHTMLForm: Don't output an empty hidden LabelWidget if not needed

The hidden element is only needed if either a header is set or the form
has errors. If both does not apply, the element isn't needed and should
be omitted instead of hidden with `display:none`.

It's also not needed to add a LabelWidget for the header, if the form has
errors, only, but no header (which would result in an empty space between
the header and the fieldset legend).

Follow up: Ifbf38878d41906184f97169b22002f788711a311

Change-Id: I4ffefdc50d435590d25a7dfc202228920dd801ae
includes/htmlform/OOUIHTMLForm.php
resources/src/mediawiki/mediawiki.htmlform.ooui.css