OOUIHTMLForm: Prevent duplicate FieldsetLayout wrapping
authorBartosz Dziewoński <matma.rex@gmail.com>
Thu, 16 Nov 2017 10:24:47 +0000 (11:24 +0100)
committerBartosz Dziewoński <matma.rex@gmail.com>
Thu, 16 Nov 2017 12:40:56 +0000 (12:40 +0000)
commite3fa6b8d34a9bbb43a8c6fbf5d2859bcbfe0791c
tree8e5e779072e37320c7e218c7256b97961e468781
parent2a06bc44ca1059395f86fd1f6c5abab80c9b303d
OOUIHTMLForm: Prevent duplicate FieldsetLayout wrapping

The code in formatSection() assumed it was only called for the
toplevel section (the whole form), while it's actually called
for every subsection too. I think it was written before we added
support for subsections in OOUIHTMLForm.

Move code for toplevel section wrapping to wrapForm().

As a bonus, this also fixes display of custom headers and error
or warning messages for forms with subsections.

Bug: T180535
Change-Id: I6a88184d302a951be78387490404137acde3fa1a
includes/htmlform/OOUIHTMLForm.php