if( wfEmptyMsg( 'restriction-' . $action, $msg ) ) {
$msg = $action;
}
- $label = Xml::element( 'label', array( 'for' => "mwProtect-level-$action" ), $msg );
- $out .= "<tr><td><table>" .
- "<tr><th>$label</th><th></th></tr>" .
- "<tr><td>" . $this->buildSelector( $action, $selected ) . "</td><td>";
+ $out .= "<tr><td>".
+ Xml::openElement( 'fieldset' ) .
+ Xml::element( 'legend', null, $msg ) .
+ Xml::openElement( 'table', array( 'id' => "mw-protect-table-$action" ) ) .
+ "<tr><td>" . $this->buildSelector( $action, $selected ) . "</td></tr><tr><td>";
$reasonDropDown = Xml::listDropDown( 'wpProtectReasonSelection',
wfMsgForContent( 'protect-dropdown' ),
Xml::input( "mwProtect-expiry-$action", 50, $this->mExpiry[$action], $attribs ) .
'</td>
</tr></table>';
- $out .= "</td></tr></table></td></tr>";
+ $out .= "</td></tr>" .
+ Xml::closeElement( 'table' ) .
+ Xml::closeElement( 'fieldset' ) .
+ "</td></tr>";
}
$out .= Xml::closeElement( 'tbody' ) . Xml::closeElement( 'table' );
}
$script .= "[" . implode(',',$CascadeableLevels) . "];\n";
$options = (object)array(
- 'tableId' => 'mw-protect-table2',
+ 'tableId' => 'mw-protect-table-move',
'labelText' => wfMsg( 'protect-unchain' ),
'numTypes' => count($this->mApplicableTypes),
'existingMatch' => 1 == count( array_unique( $this->mExistingExpiry ) ),
var box = document.getElementById( opts.tableId );
if( !box )
return false;
-
- var tbody = box.getElementsByTagName( 'tbody' )[0];
+
+ var boxbody = box.getElementsByTagName('tbody')[0]
var row = document.createElement( 'tr' );
- tbody.appendChild( row );
+ boxbody.insertBefore( row, boxbody.firstChild );
this.existingMatch = opts.existingMatch;
- row.appendChild( document.createElement( 'td' ) );
var cell = document.createElement( 'td' );
row.appendChild( cell );
// If there is only one protection type, there is nothing to chain