Makes it easy to identify all HTMLForms on a page.
Change-Id: I5b9494fc925ac953c14b358331acddfe80c2661d
: 'application/x-www-form-urlencoded';
# Attributes
$attribs = [
+ 'class' => 'mw-htmlform',
'action' => $this->getAction(),
'method' => $this->getMethod(),
'enctype' => $encType,
return Html::rawElement(
'form',
- $this->getFormAttributes() + [ 'class' => 'visualClear' ],
+ $this->getFormAttributes(),
$html
);
}
public function wrapForm( $html ) {
$form = new OOUI\FormLayout( $this->getFormAttributes() + [
- 'classes' => [ 'mw-htmlform-ooui' ],
+ 'classes' => [ 'mw-htmlform', 'mw-htmlform-ooui' ],
'content' => new OOUI\HtmlSnippet( $html ),
] );
protected function getFormAttributes() {
$attribs = parent::getFormAttributes();
- $attribs['class'] = [ 'mw-ui-vform', 'mw-ui-container', 'visualClear' ];
+ $attribs['class'] = [ 'mw-htmlform', 'mw-ui-vform', 'mw-ui-container' ];
return $attribs;
}
/* HTMLForm styles */
+.mw-htmlform {
+ clear: both;
+}
+
table.mw-htmlform-nolabel td.mw-label {
display: none;
}
$user = new TestUser( __METHOD__ );
list( $html, ) = $this->executeSpecialPage( 'clear', null, 'qqx', $user->getUser() );
$this->assertRegExp(
- '/<form action=".*?Special:EditWatchlist\/clear" method="post" class="visualClear">/',
+ '/<form class="mw-htmlform" action=".*?Special:EditWatchlist\/clear" method="post">/',
$html
);
}