X-Git-Url: https://scripts.mit.edu/gitweb/autoinstallsdev/mediawiki.git/blobdiff_plain/19e297c21b10b1b8a3acad5e73fc71dcb35db44a..6932310fd58ebef145fa01eb76edf7150284d8ea:/includes/htmlform/OOUIHTMLForm.php diff --git a/includes/htmlform/OOUIHTMLForm.php b/includes/htmlform/OOUIHTMLForm.php new file mode 100644 index 00000000..e47de61a --- /dev/null +++ b/includes/htmlform/OOUIHTMLForm.php @@ -0,0 +1,296 @@ +getOutput()->enableOOUI(); + $this->getOutput()->addModuleStyles( 'mediawiki.htmlform.ooui.styles' ); + } + + /** + * Symbolic display format name. + * @var string + */ + protected $displayFormat = 'ooui'; + + public static function loadInputFromParameters( $fieldname, $descriptor, + HTMLForm $parent = null + ) { + $field = parent::loadInputFromParameters( $fieldname, $descriptor, $parent ); + $field->setShowEmptyLabel( false ); + return $field; + } + + public function getButtons() { + $buttons = ''; + + // IE<8 has bugs with