* (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
* @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'] ) {
?>
/> <label for="wpRemember"><?php $this->msg('remembermypassword') ?></label>
</td>
</tr>
+<?php
+ $tabIndex = 8;
+ if ( isset( $this->data['extraInput'] ) && is_array( $this->data['extraInput'] ) ) {
+ foreach ( $this->data['extraInput'] as $inputItem ) { ?>
+ <tr>
+ <?php
+ if ( !empty( $inputItem['msg'] ) && $inputItem['type'] != 'checkbox' ) {
+ ?><td class="mw-label"><label for="<?php
+ echo htmlspecialchars( $inputItem['name'] ); ?>"><?php
+ $this->msgWiki( $inputItem['msg'] ) ?></label><?php
+ } else {
+ ?><td><?php
+ }
+ ?></td>
+ <td class="mw-input">
+ <input type="<?php echo htmlspecialchars( $inputItem['type'] ) ?>" name="<?php
+ echo htmlspecialchars( $inputItem['name'] ); ?>"
+ tabindex="<?php echo $tabIndex++; ?>"
+ value="<?php
+ if ( $inputItem['type'] != 'checkbox' ) {
+ echo htmlspecialchars( $inputItem['value'] );
+ } else {
+ echo '1';
+ }
+ ?>" id="<?php echo htmlspecialchars( $inputItem['name'] ); ?>"
+ <?php
+ if ( $inputItem['type'] == 'checkbox' && !empty( $inputItem['value'] ) )
+ echo 'checked="checked"';
+ ?> /> <?php
+ if ( $inputItem['type'] == 'checkbox' && !empty( $inputItem['msg'] ) ) {
+ ?>
+ <label for="<?php echo htmlspecialchars( $inputItem['name'] ); ?>"><?php
+ $this->msg( $inputItem['msg'] ) ?></label><?php
+ }
+ ?>
+ </td>
+ </tr>
+<?php
+
+ }
+ }
+?>
<tr>
<td></td>
<td class="mw-submit">
<input type='submit' name="wpCreateaccount" id="wpCreateaccount"
- tabindex="8"
+ tabindex="<?php echo $tabIndex++; ?>"
value="<?php $this->msg('createaccount') ?>" />
<?php if( $this->data['createemail'] ) { ?>
<input type='submit' name="wpCreateaccountMail" id="wpCreateaccountMail"
- tabindex="9"
+ tabindex="<?php echo $tabIndex++; ?>"
value="<?php $this->msg('createaccountmail') ?>" />
<?php } ?>
</td>