From a88f8a496b70cb2dc1c33cae5132548482352a45 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bartosz=20Dziewo=C5=84ski?= Date: Fri, 16 May 2014 17:53:33 +0200 Subject: [PATCH] =?utf8?q?mediawiki.ui:=20Rename=20.mw-ui-vform-div=20?= =?utf8?q?=E2=86=92=20.mw-ui-vform-field?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Require use of class instead of applying styling to all
s This resolves a few FIXMEs and dramatically lowers the awkwardness level of using mediawiki.ui. '.mw-ui-vform-field' is a more descriptive name than '.mw-ui-vform-div' and corresponds to the HTMLFormField PHP class in core which generates
s with this CSS class. We previously styled '.mw-ui-vform > div' the same way we styled '.mw-ui-vform .mw-ui-vform-div', which was an annoying piece of magic causing difficult to debug problems when one needed a different HTML structure (like bug 63233). Explicitly using '.mw-ui-vform-field' where applicable is a lot saner. Change-Id: I6f0b8842f5fdf70b97decb165086d1a83428b259 --- includes/htmlform/HTMLFormField.php | 2 +- includes/templates/Usercreate.php | 20 +++++----- includes/templates/Userlogin.php | 14 ++++--- .../components/default/forms.less | 38 ++++++++----------- 4 files changed, 35 insertions(+), 39 deletions(-) diff --git a/includes/htmlform/HTMLFormField.php b/includes/htmlform/HTMLFormField.php index 0e1860bef0..8076e8ad24 100644 --- a/includes/htmlform/HTMLFormField.php +++ b/includes/htmlform/HTMLFormField.php @@ -504,7 +504,7 @@ abstract class HTMLFormField { ); $divCssClasses = array( "mw-htmlform-field-$fieldType", $this->mClass, $errorClass ); if ( $this->mParent->isVForm() ) { - $divCssClasses[] = 'mw-ui-vform-div'; + $divCssClasses[] = 'mw-ui-vform-field'; } $wrapperAttributes = array( diff --git a/includes/templates/Usercreate.php b/includes/templates/Usercreate.php index 9118701703..a4240e2fc8 100644 --- a/includes/templates/Usercreate.php +++ b/includes/templates/Usercreate.php @@ -73,7 +73,7 @@ class UsercreateTemplate extends BaseTemplate {
-
+
-
+
data['createemail'] ) { ?>
-
+
addOption( $dom ); } ?> -
+
getHTML(); ?> @@ -135,7 +135,7 @@ class UsercreateTemplate extends BaseTemplate {
-
+
-
+
data['useemail'] ) { ?>