jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/324959 )
Change subject: HTMLForm: Use 'mw-htmlform' CSS class
..
HTMLForm: Use 'mw-htmlform' CSS class
Makes it easy to identify all HTMLForms on a page.
Change-Id: I5b9494fc925ac953c14b358331acddfe80c2661d
---
M includes/htmlform/HTMLForm.php
M includes/htmlform/OOUIHTMLForm.php
M includes/htmlform/VFormHTMLForm.php
M resources/src/mediawiki/htmlform/styles.css
M tests/phpunit/includes/specials/SpecialEditWatchlistTest.php
5 files changed, 9 insertions(+), 4 deletions(-)
Approvals:
Krinkle: Looks good to me, but someone else must approve
Legoktm: Looks good to me, approved
jenkins-bot: Verified
Jforrester: Looks good to me, approved
diff --git a/includes/htmlform/HTMLForm.php b/includes/htmlform/HTMLForm.php
index 71ccaa3..5c5a9a7 100644
--- a/includes/htmlform/HTMLForm.php
+++ b/includes/htmlform/HTMLForm.php
@@ -1047,6 +1047,7 @@
: 'application/x-www-form-urlencoded';
# Attributes
$attribs = [
+ 'class' => 'mw-htmlform',
'action' => $this->getAction(),
'method' => $this->getMethod(),
'enctype' => $encType,
@@ -1079,7 +1080,7 @@
return Html::rawElement(
'form',
- $this->getFormAttributes() + [ 'class' => 'visualClear'
],
+ $this->getFormAttributes(),
$html
);
}
diff --git a/includes/htmlform/OOUIHTMLForm.php
b/includes/htmlform/OOUIHTMLForm.php
index 46b570d..54bdf04 100644
--- a/includes/htmlform/OOUIHTMLForm.php
+++ b/includes/htmlform/OOUIHTMLForm.php
@@ -275,7 +275,7 @@
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 ),
] );
diff --git a/includes/htmlform/VFormHTMLForm.php
b/includes/htmlform/VFormHTMLForm.php
index 5d9f7a0..325526b 100644
--- a/includes/htmlform/VFormHTMLForm.php
+++ b/includes/htmlform/VFormHTMLForm.php
@@ -67,7 +67,7 @@
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;
}
diff --git a/resources/src/mediawiki/htmlform/styles.css
b/resources/src/mediawiki/htmlform/styles.css
index 1603130..1b9d2fb 100644
--- a/resources/src/mediawiki/htmlform/styles.css
+++ b/resources/src/mediawiki/htmlform/styles.css
@@ -1,5 +1,9 @@
/* HTMLForm styles */
+.mw-htmlform {
+ clear: both;
+}
+
table.mw-htmlform-nolabel td.mw-label {
display: none;
}
diff --git a/tests/phpunit/includes/specials/SpecialEditWatchlistTest.php
b/tests/phpunit/includes/specials/SpecialEditWatchlistTest.php
index cd84d79..ab3ac55 100644
--- a/tests/phpunit/includes/specials/SpecialEditWatchlistTest.php
+++ b/tests/phpunit/includes/specials/SpecialEditWatchlistTest.php
@@ -33,7 +33,7 @@
$user = new TestUser( __METHOD__ );
list( $html, ) = $this->executeSpecialPage( 'clear', null,
'qqx', $user->getUser() );
$this->assertRegExp(
- '//',
+ '//',
$html
);
}
--
To view, visit https://gerrit.wikimedia.org/r/324959
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I5b9494fc925ac953c14b358331acddfe80c2661d
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński
Gerrit-Reviewer: Florianschmidtwelzow
Gerrit-Reviewer: Jack Phoenix
Gerrit-Reviewer: Jforrester
Gerrit-Reviewer: Krinkle
Gerrit-Reviewer: Legoktm
Gerrit-Reviewer: jenkins-bot <>
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits