Index: trunk/phase3/includes/HTMLForm.php |
— | — | @@ -113,6 +113,15 @@ |
114 | 114 | protected $mButtons = array(); |
115 | 115 | |
116 | 116 | protected $mWrapperLegend = false; |
| 117 | + |
| 118 | + /** |
| 119 | + * If true, sections that contain both fields and subsections will |
| 120 | + * render their subsections before their fields. |
| 121 | + * |
| 122 | + * Subclasses may set this to false to render subsections after fields |
| 123 | + * instead. |
| 124 | + */ |
| 125 | + protected $mSubSectionBeforeFields = true; |
117 | 126 | |
118 | 127 | /** |
119 | 128 | * Build a new HTMLForm from an array of field attributes |
— | — | @@ -775,7 +784,11 @@ |
776 | 785 | $tableHtml = Html::rawElement( 'table', $attribs, |
777 | 786 | Html::rawElement( 'tbody', array(), "\n$tableHtml\n" ) ) . "\n"; |
778 | 787 | |
779 | | - return $subsectionHtml . "\n" . $tableHtml; |
| 788 | + if ( $this->mSubSectionBeforeFields ) { |
| 789 | + return $subsectionHtml . "\n" . $tableHtml; |
| 790 | + } else { |
| 791 | + return $tableHtml . "\n" . $subsectionHtml; |
| 792 | + } |
780 | 793 | } |
781 | 794 | |
782 | 795 | /** |
Index: trunk/phase3/includes/Preferences.php |
— | — | @@ -1487,6 +1487,9 @@ |
1488 | 1488 | |
1489 | 1489 | /** Some tweaks to allow js prefs to work */ |
1490 | 1490 | class PreferencesForm extends HTMLForm { |
| 1491 | + // Override default value from HTMLForm |
| 1492 | + protected $mSubSectionBeforeFields = false; |
| 1493 | + |
1491 | 1494 | private $modifiedUser; |
1492 | 1495 | |
1493 | 1496 | public function setModifiedUser( $user ) { |