Index: trunk/phase3/includes/SpecialUserrights.php |
— | — | @@ -279,14 +279,16 @@ |
280 | 280 | */ |
281 | 281 | function switchForm() { |
282 | 282 | global $wgOut, $wgScript; |
283 | | - $form = Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'name' => 'uluser' ) ); |
284 | | - $form .= Xml::hidden( 'title', 'Special:Userrights' ); |
285 | | - $form .= '<fieldset><legend>' . wfMsgHtml( 'userrights-lookup-user' ) . '</legend>'; |
286 | | - $form .= '<p>' . Xml::inputLabel( wfMsg( 'userrights-user-editname' ), 'user', 'username', 30, $this->mTarget ) . '</p>'; |
287 | | - $form .= '<p>' . Xml::submitButton( wfMsg( 'editusergroup' ) ) . '</p>'; |
288 | | - $form .= '</fieldset>'; |
289 | | - $form .= '</form>'; |
290 | | - $wgOut->addHTML( $form ); |
| 283 | + $wgOut->addHTML( |
| 284 | + Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'name' => 'uluser', 'id' => 'mw-userrights-form1' ) ) . |
| 285 | + Xml::hidden( 'title', 'Special:Userrights' ) . |
| 286 | + Xml::openElement( 'fieldset' ) . |
| 287 | + Xml::element( 'legend', array(), wfMsg( 'userrights-lookup-user' ) ) . |
| 288 | + Xml::inputLabel( wfMsg( 'userrights-user-editname' ), 'user', 'username', 30, $this->mTarget ) . ' ' . |
| 289 | + Xml::submitButton( wfMsg( 'editusergroup' ) ) . |
| 290 | + Xml::closeElement( 'fieldset' ) . |
| 291 | + Xml::closeElement( 'form' ) . "\n" |
| 292 | + ); |
291 | 293 | } |
292 | 294 | |
293 | 295 | /** |
— | — | @@ -314,7 +316,6 @@ |
315 | 317 | /** |
316 | 318 | * Show the form to edit group memberships. |
317 | 319 | * |
318 | | - * @todo make all CSS-y and semantic |
319 | 320 | * @param $user User or UserRightsProxy you're editing |
320 | 321 | * @param $groups Array: Array of groups the user is in |
321 | 322 | */ |
— | — | @@ -332,51 +333,54 @@ |
333 | 334 | $grouplist = '<p>' . wfMsgHtml( 'userrights-groupsmember' ) . ' ' . implode( ', ', $list ) . '</p>'; |
334 | 335 | } |
335 | 336 | $wgOut->addHTML( |
336 | | - Xml::openElement( 'form', array( 'method' => 'post', 'action' => $this->getTitle()->escapeLocalURL(), 'name' => 'editGroup' ) ) . |
| 337 | + Xml::openElement( 'form', array( 'method' => 'post', 'action' => $this->getTitle()->getLocalURL(), 'name' => 'editGroup', 'id' => 'mw-userrights-form2' ) ) . |
337 | 338 | Xml::hidden( 'user', $this->mTarget ) . |
338 | 339 | Xml::hidden( 'wpEditToken', $wgUser->editToken( $this->mTarget ) ) . |
339 | 340 | Xml::openElement( 'fieldset' ) . |
340 | 341 | Xml::element( 'legend', array(), wfMsg( 'userrights-editusergroup' ) ) . |
341 | | - wfMsgExt( 'editinguser', array( 'parse' ), |
342 | | - wfEscapeWikiText( $user->getName() ) ) . |
| 342 | + wfMsgExt( 'editinguser', array( 'parse' ), wfEscapeWikiText( $user->getName() ) ) . |
343 | 343 | $grouplist . |
344 | 344 | $this->explainRights() . |
345 | | - "<table border='0'> |
346 | | - <tr> |
347 | | - <td></td> |
348 | | - <td> |
349 | | - <table width='400'> |
350 | | - <tr> |
351 | | - <td width='50%'>" . $this->removeSelect( $removable ) . "</td> |
352 | | - <td width='50%'>" . $this->addSelect( $addable ) . "</td> |
353 | | - </tr> |
354 | | - </table> |
355 | | - </tr> |
356 | | - <tr> |
357 | | - <td colspan='2'>" . |
358 | | - $wgOut->parse( wfMsg('userrights-groupshelp') ) . |
359 | | - "</td> |
360 | | - </tr> |
361 | | - <tr> |
362 | | - <td>" . |
363 | | - Xml::label( wfMsg( 'userrights-reason' ), 'wpReason' ) . |
364 | | - "</td> |
365 | | - <td>" . |
366 | | - Xml::input( 'user-reason', 60, false, array( 'id' => 'wpReason', 'maxlength' => 255 ) ) . |
367 | | - "</td> |
368 | | - </tr> |
369 | | - <tr> |
370 | | - <td></td> |
371 | | - <td>" . |
372 | | - Xml::submitButton( wfMsg( 'saveusergroups' ), array( 'name' => 'saveusergroups' ) ) . |
373 | | - "</td> |
374 | | - </tr> |
375 | | - </table>\n" . |
| 345 | + Xml::openElement( 'table', array( 'border' => '0', 'id' => 'mw-userrights-table-outer' ) ) . |
| 346 | + "<tr> |
| 347 | + <td></td> |
| 348 | + <td>" . |
| 349 | + Xml::openElement( 'table', array( 'style' => 'width:400px;', 'id' => 'mw-userrights-table-inner' ) ) . |
| 350 | + "<tr> |
| 351 | + <td style='width:50%;'>" . |
| 352 | + $this->removeSelect( $removable ) . |
| 353 | + "</td> |
| 354 | + <td style='width:50%;'>" . |
| 355 | + $this->addSelect( $addable ) . |
| 356 | + "</td> |
| 357 | + </tr>" . |
| 358 | + Xml::closeElement( 'table' ) . |
| 359 | + "</tr> |
| 360 | + <tr> |
| 361 | + <td colspan='2'>" . |
| 362 | + $wgOut->parse( wfMsg( 'userrights-groupshelp' ) ) . |
| 363 | + "</td> |
| 364 | + </tr> |
| 365 | + <tr> |
| 366 | + <td>" . |
| 367 | + Xml::label( wfMsg( 'userrights-reason' ), 'wpReason' ) . |
| 368 | + "</td> |
| 369 | + <td>" . |
| 370 | + Xml::input( 'user-reason', 60, false, array( 'id' => 'wpReason', 'maxlength' => 255 ) ) . |
| 371 | + "</td> |
| 372 | + </tr> |
| 373 | + <tr> |
| 374 | + <td></td> |
| 375 | + <td>" . |
| 376 | + Xml::submitButton( wfMsg( 'saveusergroups' ), array( 'name' => 'saveusergroups' ) ) . |
| 377 | + "</td> |
| 378 | + </tr>" . |
| 379 | + Xml::closeElement( 'table' ) . "\n" . |
376 | 380 | Xml::closeElement( 'fieldset' ) . |
377 | 381 | Xml::closeElement( 'form' ) . "\n" |
378 | 382 | ); |
379 | 383 | } |
380 | | - |
| 384 | + |
381 | 385 | /** |
382 | 386 | * Format a link to a group description page |
383 | 387 | * |
— | — | @@ -568,8 +572,7 @@ |
569 | 573 | ) |
570 | 574 | ) |
571 | 575 | ); |
572 | | - $output->addHtml( "<h2>" . htmlspecialchars( LogPage::logName( 'rights' ) ) . "</h2>\n" ); |
| 576 | + $output->addHtml( Xml::element( 'h2', null, LogPage::logName( 'rights' ) . "\n" ) ); |
573 | 577 | $viewer->showList( $output ); |
574 | 578 | } |
575 | | - |
576 | 579 | } |