* (bug 20404) Custom fields in the user creation form template can now have tooltips
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Thu, 27 Aug 2009 14:15:02 +0000 (14:15 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Thu, 27 Aug 2009 14:15:02 +0000 (14:15 +0000)
CREDITS
RELEASE-NOTES
includes/templates/Userlogin.php

diff --git a/CREDITS b/CREDITS
index 714d6cd..86034bd 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -85,6 +85,7 @@ following names for their contribution to the product.
 * Matěj Grabovský
 * mati
 * Max Semenik
+* Max Sikström
 * Michael De La Rue
 * Michael Walsh
 * Mike Horvath
index 1648f64..fb7ebb9 100644 (file)
@@ -195,6 +195,8 @@ this. Was used when mwEmbed was going to be an extension.
   criteria used by Special:Random and subclasses, or substitute a custom result,
   deprecating the $wgExtraRandompageSQL config variable
 * (bug 20318) Distinct CSS classes for ISBN/RFC/PMID special links added
+* (bug 20404) Custom fields in the user creation form template can now have
+  tooltips
 
 === Bug fixes in 1.16 ===
 
index 914e773..ddf4bda 100644 (file)
@@ -123,12 +123,13 @@ class UserloginTemplate extends QuickTemplate {
  * @ingroup Templates
  */
 class UsercreateTemplate extends QuickTemplate {
-       function addInputItem( $name, $value, $type, $msg ) {
+       function addInputItem( $name, $value, $type, $msg, $helptext = false ) {
                $this->data['extraInput'][] = array(
                        'name' => $name,
                        'value' => $value,
                        'type' => $type,
                        'msg' => $msg,
+                       'helptext' => $helptext,
                );
        }
        
@@ -285,7 +286,12 @@ class UsercreateTemplate extends QuickTemplate {
                                <label for="<?php echo htmlspecialchars( $inputItem['name'] ); ?>"><?php
                                        $this->msgHtml( $inputItem['msg'] ) ?></label><?php
                                        }
+                               if( $inputItem['helptext'] !== false ) {
                                ?>
+                               <div class="prefsectiontip">
+                                       <?php $this->msgWiki( $inputItem['helptext'] ); ?>
+                               </div>
+                               <?php } ?>
                        </td>
                </tr>
 <?php