From f03599516213bfc7c1962b631834af9cb608b249 Mon Sep 17 00:00:00 2001 From: Raimond Spekking Date: Thu, 13 Mar 2008 10:05:11 +0000 Subject: [PATCH] * Add a CSS id to the 2nd table * Prettify input form for RTL wikis a bit --- includes/ProtectionForm.php | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/includes/ProtectionForm.php b/includes/ProtectionForm.php index 03e4c8ce6a..bd1606362f 100644 --- a/includes/ProtectionForm.php +++ b/includes/ProtectionForm.php @@ -208,8 +208,13 @@ class ProtectionForm { return $ok; } + /** + * Build the input form + * + * @return $out string HTML form + */ function buildForm() { - global $wgUser; + global $wgUser, $wgContLang; $out = ''; if( !$this->disabled ) { @@ -243,7 +248,7 @@ class ProtectionForm { $out .= Xml::closeElement( 'tbody' ) . Xml::closeElement( 'table' ) . - Xml::openElement( 'table' ) . + Xml::openElement( 'table', array( 'id' => 'mw-protect-table2' ) ) . Xml::openElement( 'tbody' ); global $wgEnableCascadingProtection; @@ -257,8 +262,9 @@ class ProtectionForm { } $attribs = array( 'id' => 'expires' ) + $this->disabledAttrib; - $out .= ' - ' . + $align = $wgContLang->isRtl() ? 'left' : 'right'; + $out .= " + " . Xml::label( wfMsgExt( 'protectexpiry', array( 'parseinline' ) ), 'expires' ) . ' ' . @@ -269,7 +275,7 @@ class ProtectionForm { if( !$this->disabled ) { $id = 'mwProtect-reason'; $out .= " - " . + " . Xml::label( wfMsg( 'protectcomment' ), $id ) . ' ' . -- 2.20.1