From: Bryan Tong Minh Date: Fri, 27 Jun 2008 19:45:24 +0000 (+0000) Subject: * Allow extensions to modify the user creation form by calling addInputItem(); X-Git-Tag: 1.31.0-rc.0~46855 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/fiche.php?a=commitdiff_plain;h=21a83c3597d4f523c86064f39989ebc994e5caf6;p=lhc%2Fweb%2Fwiklou.git * Allow extensions to modify the user creation form by calling addInputItem(); --- 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'] ) { ?>