From: Aaron Schulz Date: Sat, 6 Sep 2008 07:41:34 +0000 (+0000) Subject: Add class to textarea for protected pages (bug 11825) X-Git-Tag: 1.31.0-rc.0~45448 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=185cd9537249993176369cf2ac59305e08379ccb;p=lhc%2Fweb%2Fwiklou.git Add class to textarea for protected pages (bug 11825) --- diff --git a/includes/EditPage.php b/includes/EditPage.php index e733ef12f0..61cac92417 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -1190,6 +1190,7 @@ class EditPage { } } + $classes = array(); // Textarea CSS if( $this->mTitle->getNamespace() == NS_MEDIAWIKI ) { # Show a warning if editing an interface message $wgOut->addWikiMsg( 'editinginterface' ); @@ -1197,9 +1198,11 @@ class EditPage { # Is the title semi-protected? if( $this->mTitle->isSemiProtected() ) { $noticeMsg = 'semiprotectedpagewarning'; + $classes[] = 'mw-textarea-sprotected'; } else { # Then it must be protected based on static groups (regular) $noticeMsg = 'protectedpagewarning'; + $classes[] = 'mw-textarea-protected'; } $wgOut->addHTML( "
\n" ); $wgOut->addWikiMsg( $noticeMsg ); @@ -1396,7 +1399,7 @@ END {$this->editFormTextBeforeContent} END ); - $this->showTextbox1(); + $this->showTextbox1( $classes ); $wgOut->wrapWikiMsg( "
\n$1\n
", $copywarnMsg ); $wgOut->addHTML( <<scrolltop}\" name=\"wpScrolltop\" id=\"wpScrolltop\" />\n" ); } - protected function showTextbox1() { + protected function showTextbox1( $classes ) { $attribs = array( 'tabindex' => 1 ); if( $this->wasDeletedSinceLastEdit() ) $attribs['type'] = 'hidden'; + if( !empty($classes) ) + $attribs['class'] = implode(' ',$classes); $this->showTextbox( $this->textbox1, 'wpTextbox1', $attribs ); }