Allow extensions to add a banner to UserLogin and CreateAccount special pages
authorFlorian <florian.schmidt.welzow@t-online.de>
Tue, 7 Jul 2015 16:51:27 +0000 (18:51 +0200)
committerFlorian <florian.schmidt.stargatewissen@gmail.com>
Thu, 16 Jul 2015 15:28:00 +0000 (17:28 +0200)
Some extensions, e.g. MobileFrontend, customize the UserLogin and UserCreate
special pages. This change adds the possibility to add some HTML after the warning
and/or error messages are printed to the output. This will be used in
MobileFrontend to get rid of the own userlogin template.

Bug: T87261
Change-Id: Ia81f7c52f08e8dcc73ac751432560c4077d4bd39

includes/templates/Usercreate.php
includes/templates/Userlogin.php

index f09b6bb..c17d575 100644 (file)
@@ -73,6 +73,12 @@ class UsercreateTemplate extends BaseTemplate {
                        <?php } ?>
                        </div>
 
+                       <?php if ( $this->data['formheader'] ) { ?>
+                               <div class="mw-form-formheader">
+                                       <?php $this->html( 'formheader' ); /* extensions such as MobileFrontend add html here */ ?>
+                               </div>
+                       <?php } ?>
+
                        <div class="mw-ui-vform-field">
                                <label for='wpName2'>
                                        <?php $this->msg( 'userlogin-yourname' ); ?>
index 345bb71..4a0b413 100644 (file)
@@ -56,6 +56,11 @@ class UserloginTemplate extends BaseTemplate {
                                </div>
                        <?php } ?>
 
+                       <?php if ( $this->data['formheader'] ) { ?>
+                               <div class="mw-form-formheader">
+                                       <?php $this->html( 'formheader' ); /* extensions such as MobileFrontend add html here */ ?>
+                               </div>
+                       <?php } ?>
                        <div class="mw-ui-vform-field">
                                <label for='wpName1'>
                                        <?php