From c2a7904841a923138acb00d7d3314af0c06625fd Mon Sep 17 00:00:00 2001 From: Raimond Spekking Date: Sat, 21 Feb 2009 16:04:25 +0000 Subject: [PATCH] Add an ID if 'missingsummary' is triggered to allow styling of the summary line --- RELEASE-NOTES | 3 ++- includes/EditPage.php | 17 +++++++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index d003ff515a..7684a190d4 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -115,7 +115,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 17585) Hide legend on Special:Specialpages from non-privileged users * (bug 15876) Users with 'reset-passwords' right can change the passwords of other users. - +* Add an ID if 'missingsummary' is triggered to allow styling of the summary + line === Bug fixes in 1.15 === * (bug 16968) Special:Upload no longer throws useless warnings. * (bug 17000) Special:RevisionDelete now checks if the database is locked diff --git a/includes/EditPage.php b/includes/EditPage.php index b1d8b4821f..bf7a3602f6 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -1343,10 +1343,13 @@ class EditPage { if ( $this->section == 'new' ) { $commentsubject = ''; if ( !$wgRequest->getBool( 'nosummary' ) ) { + # Add an ID if 'missingsummary' is triggered to allow styling of the summary line + $summaryMissedID = $this->missingSummary ? ' mw-summarymissed' : ''; + $commentsubject = Xml::tags( 'label', array( 'for' => 'wpSummary' ), $subject ); $commentsubject = - Xml::tags( 'span', array( 'id' => 'wpSummaryLabel' ), $commentsubject ); + Xml::tags( 'span', array( 'id' => "wpSummaryLabel$summaryMissedID" ), $commentsubject ); $commentsubject .= ' '; $commentsubject .= Xml::input( 'wpSummary', 60, @@ -1365,10 +1368,12 @@ class EditPage { } else { $commentsubject = ''; + # Add an ID if 'missingsummary' is triggered to allow styling of the summary line + $summaryMissedID = $this->missingSummary ? ' mw-summarymissed' : ''; + $editsummary = Xml::tags( 'label', array( 'for' => 'wpSummary' ), $summary ); - $editsummary = - Xml::tags( 'span', array( 'id' => 'wpSummaryLabel' ), $editsummary ) . ' '; - + $editsummary = Xml::tags( 'span', array( 'id' => "wpSummaryLabel$summaryMissedID" ), $editsummary ) . ' '; + $editsummary .= Xml::input( 'wpSummary', 60, $summarytext, @@ -1377,11 +1382,11 @@ class EditPage { 'maxlength' => '200', 'tabindex' => '1' ) ); - + // No idea where this is closed. $editsummary = Xml::openElement( 'div', array( 'class' => 'editOptions' ) ) . $editsummary . '
'; - + $summarypreview = ''; if ( $summarytext && $this->preview ) { $summarypreview = -- 2.20.1