From 4f3932ad265c563055c2dceb80e218422b1501d3 Mon Sep 17 00:00:00 2001
From: =?utf8?q?Bartosz=20Dziewo=C5=84ski?=
Date: Thu, 19 Nov 2015 21:31:16 +0100
Subject: [PATCH] SpecialWatchlist: Keep checkboxes and their labels together
Style added to shared.css, since I intend to reuse it elsewhere.
We have a lot of inline style="white-space: nowrap;" in some places.
Bug: T119055
Change-Id: If6cfcaac070cd51a93c078248b65020ae81d94f2
---
includes/specials/SpecialWatchlist.php | 14 +++++++-------
resources/src/mediawiki.legacy/shared.css | 4 ++++
2 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/includes/specials/SpecialWatchlist.php b/includes/specials/SpecialWatchlist.php
index 52ff4cdfa1..2feaa9e21f 100644
--- a/includes/specials/SpecialWatchlist.php
+++ b/includes/specials/SpecialWatchlist.php
@@ -480,21 +480,21 @@ class SpecialWatchlist extends ChangesListSpecialPage {
'id' => 'namespace',
'class' => 'namespaceselector',
)
- ) . ' ';
- $form .= Xml::checkLabel(
+ ) . "\n";
+ $form .= '' . Xml::checkLabel(
$this->msg( 'invert' )->text(),
'invert',
'nsinvert',
$opts['invert'],
array( 'title' => $this->msg( 'tooltip-invert' )->text() )
- ) . ' ';
- $form .= Xml::checkLabel(
+ ) . "\n";
+ $form .= '' . Xml::checkLabel(
$this->msg( 'namespace_association' )->text(),
'associated',
'nsassociated',
$opts['associated'],
array( 'title' => $this->msg( 'tooltip-namespace_association' )->text() )
- ) . ' ';
+ ) . "\n";
$form .= Xml::submitButton( $this->msg( 'allpagessubmit' )->text() ) . "
\n";
foreach ( $hiddenFields as $key => $value ) {
$form .= Html::hidden( $key, $value ) . "\n";
@@ -598,12 +598,12 @@ class SpecialWatchlist extends ChangesListSpecialPage {
protected function showHideCheck( $options, $message, $name, $value ) {
$options[$name] = 1 - (int)$value;
- return Xml::checkLabel(
+ return '' . Xml::checkLabel(
$this->msg( $message, '' )->text(),
$name,
$name,
(int)$value
- );
+ ) . '';
}
/**
diff --git a/resources/src/mediawiki.legacy/shared.css b/resources/src/mediawiki.legacy/shared.css
index 07d9780e2e..75a091c36d 100644
--- a/resources/src/mediawiki.legacy/shared.css
+++ b/resources/src/mediawiki.legacy/shared.css
@@ -191,6 +191,10 @@ input#wpSummary {
margin-bottom: 1em;
}
+.mw-input-with-label {
+ white-space: nowrap;
+}
+
/**
* Image captions.
*
--
2.20.1