From dd107dda969ac77b86a89b0e98fcf85352c6035d Mon Sep 17 00:00:00 2001 From: Bryan Davis Date: Fri, 5 Sep 2014 15:56:19 -0600 Subject: [PATCH] Apply vform styling to HTMLForm buttons Check for isVForm() and apply styling matching the default submit button when generating alternate form submit buttons. Change-Id: Ia3313087248af1537ac4740694846b6ff1187b1a --- includes/htmlform/HTMLForm.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/includes/htmlform/HTMLForm.php b/includes/htmlform/HTMLForm.php index fc2222ad8c..c810f68d00 100644 --- a/includes/htmlform/HTMLForm.php +++ b/includes/htmlform/HTMLForm.php @@ -936,12 +936,15 @@ class HTMLForm extends ContextSource { $attrs['id'] = $button['id']; } - if ( $useMediaWikiUIEverywhere ) { + 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"; -- 2.20.1