From 21a83c3597d4f523c86064f39989ebc994e5caf6 Mon Sep 17 00:00:00 2001 From: Bryan Tong Minh Date: Fri, 27 Jun 2008 19:45:24 +0000 Subject: [PATCH] * Allow extensions to modify the user creation form by calling addInputItem(); --- RELEASE-NOTES | 3 +- includes/templates/Userlogin.php | 55 ++++++++++++++++++++++++++++++-- 2 files changed, 55 insertions(+), 3 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index d8a7a58765..87cb4b576a 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -171,7 +171,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bugs 4832, 9481, 12890) Special:Recentchangeslinked now has all options that are in Special:Recentchanges * Allow an $error message to be passed to ArticleDelete hook - +* Allow extensions to modify the user creation form by calling addInputItem(); + === Bug fixes in 1.13 === * (bug 10677) Add link to the file description page on the shared repository diff --git a/includes/templates/Userlogin.php b/includes/templates/Userlogin.php index 4a2078c67d..deeeb2741e 100644 --- a/includes/templates/Userlogin.php +++ b/includes/templates/Userlogin.php @@ -97,6 +97,15 @@ class UserloginTemplate extends QuickTemplate { * @ingroup Templates */ class UsercreateTemplate extends QuickTemplate { + function addInputItem( $name, $value, $type, $msg ) { + $this->data['extraInput'][] = array( + 'name' => $name, + 'value' => $value, + 'type' => $type, + 'msg' => $msg, + ); + } + function execute() { if( $this->data['message'] ) { ?> @@ -197,15 +206,57 @@ class UsercreateTemplate extends QuickTemplate { /> +data['extraInput'] ) && is_array( $this->data['extraInput'] ) ) { + foreach ( $this->data['extraInput'] as $inputItem ) { ?> + + + + /> + + + + data['createemail'] ) { ?> -- 2.20.1