From: Raimond Spekking Date: Wed, 16 Apr 2008 15:58:25 +0000 (+0000) Subject: * Use existing CSS classes for input form aligning X-Git-Tag: 1.31.0-rc.0~48271 X-Git-Url: http://git.cyclocoop.org/url?a=commitdiff_plain;h=6c9f80faadf4f454aa42beec1239df11dcd355fe;p=lhc%2Fweb%2Fwiklou.git * Use existing CSS classes for input form aligning * Use more XML functions --- diff --git a/includes/ProtectionForm.php b/includes/ProtectionForm.php index 4f40e7ef11..27437d2ec0 100644 --- a/includes/ProtectionForm.php +++ b/includes/ProtectionForm.php @@ -214,7 +214,7 @@ class ProtectionForm { * @return $out string HTML form */ function buildForm() { - global $wgUser, $wgContLang; + global $wgUser; $out = ''; if( !$this->disabled ) { @@ -258,19 +258,18 @@ class ProtectionForm { if( $wgEnableCascadingProtection && $this->mTitle->exists() ) { $out .= ' - ' . + ' . Xml::checkLabel( wfMsg( 'protect-cascade' ), 'mwProtect-cascade', 'mwProtect-cascade', $this->mCascade, $this->disabledAttrib ) . " \n"; } $attribs = array( 'id' => 'expires' ) + $this->disabledAttrib; - $align = $wgContLang->isRtl() ? 'left' : 'right'; $out .= " - " . + " . Xml::label( wfMsgExt( 'protectexpiry', array( 'parseinline' ) ), 'expires' ) . ' - ' . + ' . Xml::input( 'mwProtect-expiry', 60, $this->mExpiry, $attribs ) . ' '; @@ -278,16 +277,16 @@ class ProtectionForm { if( !$this->disabled ) { $id = 'mwProtect-reason'; $out .= " - " . + " . Xml::label( wfMsg( 'protectcomment' ), $id ) . ' - ' . + ' . Xml::input( $id, 60, $this->mReason, array( 'type' => 'text', 'id' => $id, 'maxlength' => 255 ) ) . " - " . + " . Xml::checkLabel( wfMsg( 'watchthis' ), 'mwProtectWatch', 'mwProtectWatch', $this->mTitle->userIsWatching() || $wgUser->getOption( 'watchdefault' ) ) . @@ -295,7 +294,7 @@ class ProtectionForm { - " . + " . Xml::submitButton( wfMsg( 'confirm' ), array( 'id' => 'mw-Protect-submit' ) ) . " \n"; @@ -351,9 +350,7 @@ class ProtectionForm { function buildScript() { global $wgStylePath, $wgStyleVersion; - return ''; + return Xml::tags( 'script', array( 'type' => 'text/javascript', 'src' => htmlspecialchars( $wgStylePath . "/common/protect.js?$wgStyleVersion" ) ), '' ); } function buildCleanupScript() { @@ -367,7 +364,7 @@ class ProtectionForm { } $script .= "[" . implode(',',$CascadeableLevels) . "];\n"; $script .= 'protectInitialize("mwProtectSet","' . Xml::escapeJsString( wfMsg( 'protect-unchain' ) ) . '","' . count($this->mApplicableTypes) . '")'; - return ''; + return Xml::tags( 'script', array( 'type' => 'text/javascript' ), $script ); } /**