Apply vform styling to HTMLForm buttons
[lhc/web/wiklou.git] / includes / htmlform / HTMLForm.php
index 3a455ab..c810f68 100644 (file)
@@ -120,6 +120,7 @@ class HTMLForm extends ContextSource {
                'edittools' => 'HTMLEditTools',
                'checkmatrix' => 'HTMLCheckMatrix',
                'cloner' => 'HTMLFormFieldCloner',
+               'autocompleteselect' => 'HTMLAutoCompleteSelectField',
                // HTMLTextField will output the correct type="" attribute automagically.
                // There are about four zillion other HTML5 input types, like range, but
                // we don't use those at the moment, so no point in adding all of them.
@@ -935,12 +936,15 @@ class HTMLForm extends ContextSource {
                                $attrs['id'] = $button['id'];
                        }
 
-                       if ( $useMediaWikiUIEverywhere ) {
-                               if ( isset( $attrs['class' ] ) ) {
+                       if ( $this->isVForm() || $useMediaWikiUIEverywhere ) {
+                               if ( isset( $attrs['class'] ) ) {
                                        $attrs['class'] .= ' mw-ui-button';
                                } else {
                                        $attrs['class'] = 'mw-ui-button';
                                }
+                               if ( $this->isVForm() ) {
+                                       $attrs['class'] .= ' mw-ui-big mw-ui-block';
+                               }
                        }
 
                        $buttons .= Html::element( 'input', $attrs ) . "\n";