From: Bartosz DziewoƄski Date: Thu, 25 Aug 2016 20:23:17 +0000 (+0200) Subject: LoginSignupSpecialPage: Restore old display of 'createacct-helpusername' X-Git-Tag: 1.31.0-rc.0~5884^2 X-Git-Url: https://git.cyclocoop.org//%22?a=commitdiff_plain;h=b7d92c71e45f447e7421835bf336efa1cab6611e;p=lhc%2Fweb%2Fwiklou.git LoginSignupSpecialPage: Restore old display of 'createacct-helpusername' Note that this message is empty by default. You'll have to create it on your wiki to see effects of this change. Bug: T143923 Change-Id: I509c13775426b8d51f65c95af49dffb84ccaa0f4 --- diff --git a/includes/specialpage/LoginSignupSpecialPage.php b/includes/specialpage/LoginSignupSpecialPage.php index 22c38cb21b..c3d43df266 100644 --- a/includes/specialpage/LoginSignupSpecialPage.php +++ b/includes/specialpage/LoginSignupSpecialPage.php @@ -835,6 +835,12 @@ abstract class LoginSignupSpecialPage extends AuthManagerSpecialPage { 'class' => 'mw-ui-flush-right mw-secure', ], $this->msg( 'userlogin-signwithsecure' )->text() ); } + $usernameHelpLink = ''; + if ( !$this->msg( 'createacct-helpusername' )->isDisabled() ) { + $usernameHelpLink = Html::rawElement( 'span', [ + 'class' => 'mw-ui-flush-right', + ], $this->msg( 'createacct-helpusername' )->parse() ); + } if ( $this->isSignup() ) { $fieldDefinitions = [ @@ -847,9 +853,7 @@ abstract class LoginSignupSpecialPage extends AuthManagerSpecialPage { 'weight' => -105, ], 'username' => [ - 'label-message' => 'userlogin-yourname', - // FIXME help-message does not match old formatting - 'help-message' => 'createacct-helpusername', + 'label-raw' => $this->msg( 'userlogin-yourname' )->escaped() . $usernameHelpLink, 'id' => 'wpName2', 'placeholder-message' => $isLoggedIn ? 'createacct-another-username-ph' : 'userlogin-yourname-ph',