Add ID to Nested Fieldsets
authorMatt Walker <mwalker@wikimedia.org>
Tue, 5 Mar 2013 23:21:06 +0000 (15:21 -0800)
committerMatt Walker <mwalker@wikimedia.org>
Tue, 5 Mar 2013 23:27:33 +0000 (15:27 -0800)
I'd rather just get rid of fieldsets when using the div output
format, but since I can't do that; at least give me the option
to style everything -- all the way down :)

Change-Id: Id95b1d98aa6ac11c5030d1ac96d05d6b60b7077e

includes/HTMLForm.php

index 684866f..5af813b 100644 (file)
@@ -957,7 +957,7 @@ class HTMLForm extends ContextSource {
                                        $hasLabel = true;
                                }
                        } elseif ( is_array( $value ) ) {
-                               $section = $this->displaySection( $value, $key );
+                               $section = $this->displaySection( $value, $key, "$fieldsetIDPrefix$key-" );
                                $legend = $this->getLegend( $key );
                                if ( isset( $this->mSectionHeaders[$key] ) ) {
                                        $section = $this->mSectionHeaders[$key] . $section;