r48007 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r48006‎ | r48007 | r48008 >
Date:01:46, 4 March 2009
Author:werdna
Status:ok
Tags:
Comment:
(bug 17548) Add ids to Global Blocking form.
Modified paths:
  • /trunk/extensions/GlobalBlocking/SpecialGlobalBlock.php (modified) (history)

Diff [purge]

Index: trunk/extensions/GlobalBlocking/SpecialGlobalBlock.php
@@ -160,9 +160,21 @@
161161 $fields = array ();
162162
163163 // Who to block
164 - $fields['ipaddress'] = Xml::input( 'wpAddress', 45, $this->mAddress );
 164+ $fields['ipaddress'] =
 165+ Xml::input( 'wpAddress',
 166+ 45,
 167+ $this->mAddress,
 168+ array('id' => 'mw-globalblock-address' )
 169+ );
 170+
165171 // Why to block them
166 - $fields['globalblocking-block-reason'] = Xml::input( 'wpReason', 45, $this->mReason );
 172+ $fields['globalblocking-block-reason'] =
 173+ Xml::input(
 174+ 'wpReason',
 175+ 45,
 176+ $this->mReason,
 177+ array( 'id' => 'mw-globalblock-reason' )
 178+ );
167179
168180 // How long to block them for
169181 if ( ( $dropdown = wfMsgNoTrans( 'globalblocking-expiry-options' ) ) != '-') {
@@ -174,14 +186,38 @@
175187 }
176188
177189 if ($dropdown == false ) {
178 - $fields['globalblocking-block-expiry'] = Xml::input( 'wpExpiry', 45, $this->mExpiry );
 190+ $fields['globalblocking-block-expiry'] =
 191+ Xml::input(
 192+ 'wpExpiry',
 193+ 45,
 194+ $this->mExpiry,
 195+ array( 'id' => 'mw-globalblock-expiry' )
 196+ );
179197 } else {
180 - $fields['globalblocking-block-expiry'] = $this->buildExpirySelector( 'wpExpiry', 'wpExpiry', $this->mExpirySelection, $dropdown );
181 - $fields['globalblocking-block-expiry-otherfield'] = Xml::input( 'wpExpiryOther', 45, $this->mExpiry == $this->mExpirySelection ? '' : $this->mExpiry );
 198+ $fields['globalblocking-block-expiry'] =
 199+ $this->buildExpirySelector(
 200+ 'wpExpiry',
 201+ 'mw-globalblock-expiry-selector',
 202+ $this->mExpirySelection,
 203+ $dropdown
 204+ );
 205+ $fields['globalblocking-block-expiry-otherfield'] =
 206+ Xml::input(
 207+ 'wpExpiryOther',
 208+ 45,
 209+ $this->mExpiry == $this->mExpirySelection ? '' : $this->mExpiry,
 210+ array( 'id' => 'mw-globalblock-expiry-other' )
 211+ );
182212 }
183213
184214 // Block all users, or just anonymous ones
185 - $fields['globalblocking-block-options'] = Xml::checkLabel( wfMsg( 'ipbanononly' ), 'wpAnonOnly', 'wpAnonOnly', $this->mAnonOnly );
 215+ $fields['globalblocking-block-options'] =
 216+ Xml::checkLabel(
 217+ wfMsg( 'ipbanononly' ),
 218+ 'wpAnonOnly',
 219+ 'mw-globalblock-anon-only',
 220+ $this->mAnonOnly
 221+ );
186222
187223 // Build a form.
188224 $submitMsg = $this->mModifyForm

Status & tagging log