jenkins-bot has submitted this change and it was merged.

Change subject: Restore Userlogin error/warning URL parameter
......................................................................


Restore Userlogin error/warning URL parameter

I accidentally removed this when rewriting for AuthManager.

Also change an ID into a CSS class for now since HTMLInfoField
does not support IDs.

Bug: T135775
Change-Id: I5663a02c9809dd573087a4a528702c949b938970
---
M includes/specialpage/LoginSignupSpecialPage.php
1 file changed, 14 insertions(+), 3 deletions(-)

Approvals:
  Anomie: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/specialpage/LoginSignupSpecialPage.php 
b/includes/specialpage/LoginSignupSpecialPage.php
index 0e4252c..bd6b08f 100644
--- a/includes/specialpage/LoginSignupSpecialPage.php
+++ b/includes/specialpage/LoginSignupSpecialPage.php
@@ -825,7 +825,7 @@
                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 @@
                                '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 @@
                        // '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'] );
                }

-- 
To view, visit https://gerrit.wikimedia.org/r/290750
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I5663a02c9809dd573087a4a528702c949b938970
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: GergÅ‘ Tisza <[email protected]>
Gerrit-Reviewer: Anomie <[email protected]>
Gerrit-Reviewer: GergÅ‘ Tisza <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to