* Fix sequence of tabindex
authorRaimond Spekking <raymond@users.mediawiki.org>
Mon, 6 Oct 2008 16:14:50 +0000 (16:14 +0000)
committerRaimond Spekking <raymond@users.mediawiki.org>
Mon, 6 Oct 2008 16:14:50 +0000 (16:14 +0000)
* Use existing CSS classes for label and input
* Break long lines

includes/FileDeleteForm.php

index f2738a3..2557dc9 100644 (file)
@@ -124,13 +124,16 @@ class FileDeleteForm {
         * Show the confirmation form
         */
        private function showForm() {
-               global $wgOut, $wgUser, $wgRequest, $wgContLang;
-               $align = $wgContLang->isRtl() ? 'left' : 'right';
+               global $wgOut, $wgUser, $wgRequest;
 
                if( $wgUser->isAllowed( 'suppressrevision' ) ) {
-                       $suppress = "<tr id=\"wpDeleteSuppressRow\" name=\"wpDeleteSuppressRow\"><td></td><td>";
-                       $suppress .= Xml::checkLabel( wfMsg( 'revdelete-suppress' ), 'wpSuppress', 'wpSuppress', false, array( 'tabindex' => '2' ) );
-                       $suppress .= "</td></tr>";
+                       $suppress = "<tr id=\"wpDeleteSuppressRow\" name=\"wpDeleteSuppressRow\">
+                                       <td></td>
+                                       <td class='mw-input'>" .
+                                               Xml::checkLabel( wfMsg( 'revdelete-suppress' ),
+                                                       'wpSuppress', 'wpSuppress', false, array( 'tabindex' => '3' ) ) .
+                                       "</td>
+                               </tr>";
                } else {
                        $suppress = '';
                }
@@ -140,30 +143,32 @@ class FileDeleteForm {
                        Xml::element( 'legend', null, wfMsg( 'filedelete-legend' ) ) .
                        Xml::hidden( 'wpEditToken', $wgUser->editToken( $this->oldimage ) ) .
                        $this->prepareMessage( 'filedelete-intro' ) .
-                       Xml::openElement( 'table' ) .
+                       Xml::openElement( 'table', array( 'id' => 'mw-img-deleteconfirm-table' ) ) .
                        "<tr>
-                               <td align='$align'>" .
+                               <td class='mw-label'>" .
                                        Xml::label( wfMsg( 'filedelete-comment' ), 'wpDeleteReasonList' ) .
                                "</td>
-                               <td>" .
+                               <td class='mw-input'>" .
                                        Xml::listDropDown( 'wpDeleteReasonList',
                                                wfMsgForContent( 'filedelete-reason-dropdown' ),
                                                wfMsgForContent( 'filedelete-reason-otherlist' ), '', 'wpReasonDropDown', 1 ) .
                                "</td>
                        </tr>
                        <tr>
-                               <td align='$align'>" .
+                               <td class='mw-label'>" .
                                        Xml::label( wfMsg( 'filedelete-otherreason' ), 'wpReason' ) .
                                "</td>
-                               <td>" .
-                                       Xml::input( 'wpReason', 60, $wgRequest->getText( 'wpReason' ), array( 'type' => 'text', 'maxlength' => '255', 'tabindex' => '2', 'id' => 'wpReason' ) ) .
+                               <td class='mw-input'>" .
+                                       Xml::input( 'wpReason', 60, $wgRequest->getText( 'wpReason' ),
+                                               array( 'type' => 'text', 'maxlength' => '255', 'tabindex' => '2', 'id' => 'wpReason' ) ) .
                                "</td>
                        </tr>
                        {$suppress}
                        <tr>
                                <td></td>
-                               <td>" .
-                                       Xml::submitButton( wfMsg( 'filedelete-submit' ), array( 'name' => 'mw-filedelete-submit', 'id' => 'mw-filedelete-submit', 'tabindex' => '3' ) ) .
+                               <td class='mw-submit'>" .
+                                       Xml::submitButton( wfMsg( 'filedelete-submit' ),
+                                               array( 'name' => 'mw-filedelete-submit', 'id' => 'mw-filedelete-submit', 'tabindex' => '4' ) ) .
                                "</td>
                        </tr>" .
                        Xml::closeElement( 'table' ) .