From 482bbd5dc8a96c367f6ef42d0fd475899cb10fc0 Mon Sep 17 00:00:00 2001 From: Raimond Spekking Date: Thu, 6 Mar 2008 19:05:07 +0000 Subject: [PATCH] * Add a nice fieldset to the input form to be consistent with other forms. * Fix indention --- includes/SpecialBlockip.php | 196 +++++++++++++++--------------- languages/messages/MessagesDe.php | 1 + languages/messages/MessagesEn.php | 1 + maintenance/language/messages.inc | 1 + 4 files changed, 102 insertions(+), 97 deletions(-) diff --git a/includes/SpecialBlockip.php b/includes/SpecialBlockip.php index cfbef1b3f3..13a6bc70a5 100644 --- a/includes/SpecialBlockip.php +++ b/includes/SpecialBlockip.php @@ -120,121 +120,123 @@ class IPBlockForm { $wgOut->addHTML( " -
- - - - - - "); - if ($showblockoptions) { +" . + Xml::openElement( 'fieldset' ) . + Xml::element( 'legend', null, wfMsg( 'blockip-legend' ) ) . + Xml::openElement( 'table', array ( 'border' => '0' ) ) . + " + + + + " + ); + if ( $showblockoptions ) { $wgOut->addHTML(" - - - "); + + " + ); } $wgOut->addHTML(" - - - - - "); - $wgOut->addHTML(" - - - - "); - $wgOut->addHTML(" - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - "); - + array( 'tabindex' => '8' ) ) . " + + " + ); + global $wgSysopEmailBans; if ( $wgSysopEmailBans && $wgUser->isAllowed( 'blockemail' ) ) { $wgOut->addHTML(" - - - + + - - "); + array( 'tabindex' => '10' )) . " + + " + ); } // Allow some users to hide name from block log, blocklist and listusers if ( $wgUser->isAllowed( 'hideuser' ) ) { $wgOut->addHTML(" - - - + + - - "); + array( 'tabindex' => '9' ) ) . " + + " + ); } - + $wgOut->addHTML(" - - - - -
{$mIpaddress} - " . Xml::input( 'wpBlockAddress', 45, $this->BlockAddress, - array( - 'tabindex' => '1', - 'id' => 'mw-bi-target', - 'onchange' => 'updateBlockOptions()' ) ) . " -
{$mIpaddress}" . + Xml::input( 'wpBlockAddress', 45, $this->BlockAddress, + array( + 'tabindex' => '1', + 'id' => 'mw-bi-target', + 'onchange' => 'updateBlockOptions()' ) ). " +
{$mIpbexpiry} - - {$mIpbexpiry} + +
{$mIpbother} - " . Xml::input( 'wpBlockOther', 45, $this->BlockOther, - array( 'tabindex' => '3', 'id' => 'mw-bi-other' ) ) . " -
{$mIpbreasonother} - $reasonDropDown -
{$mIpbreason} - " . Xml::input( 'wpBlockReason', 45, $this->BlockReason, - array( 'tabindex' => '5', 'id' => 'mw-bi-reason', - 'maxlength'=> '200' ) ) . " -
  - " . wfCheckLabel( wfMsgHtml( 'ipbanononly' ), - 'wpAnonOnly', 'wpAnonOnly', $this->BlockAnonOnly, - array( 'tabindex' => '6' ) ) . " -
  - " . wfCheckLabel( wfMsgHtml( 'ipbcreateaccount' ), - 'wpCreateAccount', 'wpCreateAccount', $this->BlockCreateAccount, - array( 'tabindex' => '7' ) ) . " -
  - " . wfCheckLabel( wfMsgHtml( 'ipbenableautoblock' ), +
{$mIpbother}" . + Xml::input( 'wpBlockOther', 45, $this->BlockOther, + array( 'tabindex' => '3', 'id' => 'mw-bi-other' ) ) . " +
{$mIpbreasonother} + $reasonDropDown +
{$mIpbreason}" . + Xml::input( 'wpBlockReason', 45, $this->BlockReason, + array( 'tabindex' => '5', 'id' => 'mw-bi-reason', 'maxlength'=> '200' ) ) . " +
 " . + wfCheckLabel( wfMsgHtml( 'ipbanononly' ), + 'wpAnonOnly', 'wpAnonOnly', $this->BlockAnonOnly, + array( 'tabindex' => '6' ) ) . " +
 " . + wfCheckLabel( wfMsgHtml( 'ipbcreateaccount' ), + 'wpCreateAccount', 'wpCreateAccount', $this->BlockCreateAccount, + array( 'tabindex' => '7' ) ) . " +
 " . + wfCheckLabel( wfMsgHtml( 'ipbenableautoblock' ), 'wpEnableAutoblock', 'wpEnableAutoblock', $this->BlockEnableAutoblock, - array( 'tabindex' => '8' ) ) . " -
  - " . wfCheckLabel( wfMsgHtml( 'ipbemailban' ), +
 " . + wfCheckLabel( wfMsgHtml( 'ipbemailban' ), 'wpEmailBan', 'wpEmailBan', $this->BlockEmail, - array( 'tabindex' => '10' )) . " -
  - " . wfCheckLabel( wfMsgHtml( 'ipbhidename' ), +
 " . + wfCheckLabel( wfMsgHtml( 'ipbhidename' ), 'wpHideName', 'wpHideName', $this->BlockHideName, - array( 'tabindex' => '9' ) ) . " -
  - " . Xml::submitButton( wfMsg( 'ipbsubmit' ), - array( 'name' => 'wpBlock', 'tabindex' => '11' ) ) . " -
" . - Xml::hidden( 'wpEditToken', $token ) . + +   + " . + Xml::submitButton( wfMsg( 'ipbsubmit' ), + array( 'name' => 'wpBlock', 'tabindex' => '11' ) ) . " + + " . + Xml::closeElement( 'table' ) . + Xml::hidden( 'wpEditToken', $token ) . + Xml::closeElement( 'fieldset' ) . "
-\n" ); +\n" + ); $wgOut->addHtml( $this->getConvenienceLinks() ); diff --git a/languages/messages/MessagesDe.php b/languages/messages/MessagesDe.php index 2f65998800..a32af30acc 100644 --- a/languages/messages/MessagesDe.php +++ b/languages/messages/MessagesDe.php @@ -1699,6 +1699,7 @@ $1', # Block/unblock 'blockip' => 'IP-Adresse/Benutzer sperren', +'blockip-legend' => 'IP-Adresse/Benutzer sperren', 'blockiptext' => 'Mit diesem Formular sperrst du eine IP-Adresse oder einen Benutzernamen, so dass von dort keine Änderungen mehr vorgenommen werden können. Dies sollte nur erfolgen, um Vandalismus zu verhindern und in Übereinstimmung mit den [[{{MediaWiki:Policy-url}}|Richtlinien]]. Bitte gib den Grund für die Sperre an.', diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 9fd4cecf29..8a0b25a69f 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -2033,6 +2033,7 @@ $1', # Block/unblock 'blockip' => 'Block user', +'blockip-legend' => 'Block user', 'blockiptext' => 'Use the form below to block write access from a specific IP address or username. This should be done only to prevent vandalism, and in accordance with [[{{MediaWiki:Policy-url}}|policy]]. Fill in a specific reason below (for example, citing particular pages that were vandalized).', diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index 622ea246fd..f6d482807f 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -1407,6 +1407,7 @@ $wgMessageStructure = array( ), 'block' => array( 'blockip', + 'blockip-legend', 'blockiptext', 'ipaddress', 'ipadressorusername', -- 2.20.1