Index: trunk/phase3/skins/common/protect.js |
— | — | @@ -19,14 +19,13 @@ |
20 | 20 | var box = document.getElementById( opts.tableId ); |
21 | 21 | if( !box ) |
22 | 22 | return false; |
23 | | - |
24 | | - var tbody = box.getElementsByTagName( 'tbody' )[0]; |
| 23 | + |
| 24 | + var boxbody = box.getElementsByTagName('tbody')[0] |
25 | 25 | var row = document.createElement( 'tr' ); |
26 | | - tbody.appendChild( row ); |
| 26 | + boxbody.insertBefore( row, boxbody.firstChild ); |
27 | 27 | |
28 | 28 | this.existingMatch = opts.existingMatch; |
29 | 29 | |
30 | | - row.appendChild( document.createElement( 'td' ) ); |
31 | 30 | var cell = document.createElement( 'td' ); |
32 | 31 | row.appendChild( cell ); |
33 | 32 | // If there is only one protection type, there is nothing to chain |
Index: trunk/phase3/includes/ProtectionForm.php |
— | — | @@ -311,10 +311,11 @@ |
312 | 312 | if( wfEmptyMsg( 'restriction-' . $action, $msg ) ) { |
313 | 313 | $msg = $action; |
314 | 314 | } |
315 | | - $label = Xml::element( 'label', array( 'for' => "mwProtect-level-$action" ), $msg ); |
316 | | - $out .= "<tr><td><table>" . |
317 | | - "<tr><th>$label</th><th></th></tr>" . |
318 | | - "<tr><td>" . $this->buildSelector( $action, $selected ) . "</td><td>"; |
| 315 | + $out .= "<tr><td>". |
| 316 | + Xml::openElement( 'fieldset' ) . |
| 317 | + Xml::element( 'legend', null, $msg ) . |
| 318 | + Xml::openElement( 'table', array( 'id' => "mw-protect-table-$action" ) ) . |
| 319 | + "<tr><td>" . $this->buildSelector( $action, $selected ) . "</td></tr><tr><td>"; |
319 | 320 | |
320 | 321 | $reasonDropDown = Xml::listDropDown( 'wpProtectReasonSelection', |
321 | 322 | wfMsgForContent( 'protect-dropdown' ), |
— | — | @@ -377,7 +378,10 @@ |
378 | 379 | Xml::input( "mwProtect-expiry-$action", 50, $this->mExpiry[$action], $attribs ) . |
379 | 380 | '</td> |
380 | 381 | </tr></table>'; |
381 | | - $out .= "</td></tr></table></td></tr>"; |
| 382 | + $out .= "</td></tr>" . |
| 383 | + Xml::closeElement( 'table' ) . |
| 384 | + Xml::closeElement( 'fieldset' ) . |
| 385 | + "</td></tr>"; |
382 | 386 | } |
383 | 387 | |
384 | 388 | $out .= Xml::closeElement( 'tbody' ) . Xml::closeElement( 'table' ); |
— | — | @@ -519,7 +523,7 @@ |
520 | 524 | } |
521 | 525 | $script .= "[" . implode(',',$CascadeableLevels) . "];\n"; |
522 | 526 | $options = (object)array( |
523 | | - 'tableId' => 'mw-protect-table2', |
| 527 | + 'tableId' => 'mw-protect-table-move', |
524 | 528 | 'labelText' => wfMsg( 'protect-unchain' ), |
525 | 529 | 'numTypes' => count($this->mApplicableTypes), |
526 | 530 | 'existingMatch' => 1 == count( array_unique( $this->mExistingExpiry ) ), |