From: Raimond Spekking Date: Thu, 2 Dec 2010 07:49:10 +0000 (+0000) Subject: Show username in input field w/o underscores X-Git-Tag: 1.31.0-rc.0~33649 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=c1da11c6a3b4ac55ace75a0854954149838e0120;p=lhc%2Fweb%2Fwiklou.git Show username in input field w/o underscores While I am at it: Update to newer Xml/Html functions --- diff --git a/includes/specials/SpecialUserrights.php b/includes/specials/SpecialUserrights.php index 050b81e16c..6ea8668b80 100644 --- a/includes/specials/SpecialUserrights.php +++ b/includes/specials/SpecialUserrights.php @@ -374,14 +374,13 @@ class UserrightsPage extends SpecialPage { function switchForm() { global $wgOut, $wgScript; $wgOut->addHTML( - Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'name' => 'uluser', 'id' => 'mw-userrights-form1' ) ) . + Html::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'name' => 'uluser', 'id' => 'mw-userrights-form1' ) ) . Html::hidden( 'title', $this->getTitle()->getPrefixedText() ) . - Xml::openElement( 'fieldset' ) . - Xml::element( 'legend', array(), wfMsg( 'userrights-lookup-user' ) ) . - Xml::inputLabel( wfMsg( 'userrights-user-editname' ), 'user', 'username', 30, $this->mTarget ) . ' ' . + Xml::fieldset( wfMsg( 'userrights-lookup-user' ) ) . + Xml::inputLabel( wfMsg( 'userrights-user-editname' ), 'user', 'username', 30, str_replace( '_', ' ', $this->mTarget ) ) . ' ' . Xml::submitButton( wfMsg( 'editusergroup' ) ) . - Xml::closeElement( 'fieldset' ) . - Xml::closeElement( 'form' ) . "\n" + Html::closeElement( 'fieldset' ) . + Html::closeElement( 'form' ) . "\n" ); }