From 30939317e7c20ad6636fab571e9d7a9df4789723 Mon Sep 17 00:00:00 2001 From: umherirrender Date: Wed, 27 Apr 2016 21:48:08 +0200 Subject: [PATCH] Style warnings from live preview on Special:Upload The live preview about warnings on Special:Upload does not style warnings added to the form. Added styles to the container to style the warnings. Also reuse the style to give the warning box on the non-js from the same style. The visual effect here is an expand box to the full width. Change-Id: I36e0bf0332eac476002569f46ab116f271f3c468 --- includes/specials/SpecialUpload.php | 5 ++++- resources/Resources.php | 1 + .../src/mediawiki.special/mediawiki.special.upload.css | 10 ++++++++++ .../src/mediawiki.special/mediawiki.special.upload.js | 7 +++++-- 4 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 resources/src/mediawiki.special/mediawiki.special.upload.css diff --git a/includes/specials/SpecialUpload.php b/includes/specials/SpecialUpload.php index 75308aa14d..09111f6fae 100644 --- a/includes/specials/SpecialUpload.php +++ b/includes/specials/SpecialUpload.php @@ -367,8 +367,11 @@ class SpecialUpload extends SpecialPage { $sessionKey = $this->mUpload->stashSession(); + // Add styles for the warning, reused from the live preview + $this->getOutput()->addModuleStyles( 'mediawiki.special.upload' ); + $warningHtml = '

' . $this->msg( 'uploadwarning' )->escaped() . "

\n" - . '