Merge "Restore Userlogin error/warning URL parameter"
This commit is contained in:
commit
3c8ef58d93
1 changed files with 14 additions and 3 deletions
|
|
@ -825,7 +825,7 @@ abstract class LoginSignupSpecialPage extends AuthManagerSpecialPage {
|
|||
array $requests, array $fieldInfo, array &$formDescriptor, $action
|
||||
) {
|
||||
$coreFieldDescriptors = $this->getFieldDefinitions( $this->fakeTemplate );
|
||||
$specialFields = array_merge( [ 'extraInput', 'linkcontainer' ],
|
||||
$specialFields = array_merge( [ 'extraInput', 'linkcontainer', 'entryError' ],
|
||||
array_keys( $this->fakeTemplate->getExtraInputDefinitions() ) );
|
||||
|
||||
// keep the ordering from getCoreFieldDescriptors() where there is no explicit weight
|
||||
|
|
@ -1027,8 +1027,8 @@ abstract class LoginSignupSpecialPage extends AuthManagerSpecialPage {
|
|||
'linkcontainer' => [
|
||||
// help link
|
||||
'type' => 'info',
|
||||
'cssclass' => 'mw-form-related-link-container',
|
||||
'id' => 'mw-userlogin-help',
|
||||
'cssclass' => 'mw-form-related-link-container mw-userlogin-help',
|
||||
// 'id' => 'mw-userlogin-help', // FIXME HTMLInfoField ignores this
|
||||
'raw' => true,
|
||||
'default' => Html::element( 'a', [
|
||||
'href' => Skin::makeInternalOrExternalUrl( wfMessage( 'helplogin-url' )
|
||||
|
|
@ -1055,6 +1055,17 @@ abstract class LoginSignupSpecialPage extends AuthManagerSpecialPage {
|
|||
// 'required' => true,
|
||||
];
|
||||
|
||||
if ( $this->mEntryError ) {
|
||||
$fieldDefinitions['entryError'] = [
|
||||
'type' => 'info',
|
||||
'default' => Html::rawElement( 'div', [ 'class' => $this->mEntryErrorType . 'box', ],
|
||||
$this->mEntryError ),
|
||||
'raw' => true,
|
||||
'rawrow' => true,
|
||||
'weight' => -100,
|
||||
];
|
||||
}
|
||||
|
||||
if ( !$this->showExtraInformation() ) {
|
||||
unset( $fieldDefinitions['linkcontainer'] );
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue