summaryrefslogtreecommitdiff
path: root/includes/templates/Userlogin.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2008-08-15 01:29:47 +0200
committerPierre Schmitz <pierre@archlinux.de>2008-08-15 01:29:47 +0200
commit370e83bb0dfd0c70de268c93bf07ad5ee0897192 (patch)
tree491674f4c242e4d6ba0d04eafa305174c35a3391 /includes/templates/Userlogin.php
parentf4debf0f12d0524d2b2427c55ea3f16b680fad97 (diff)
Update auf 1.13.0
Diffstat (limited to 'includes/templates/Userlogin.php')
-rw-r--r--includes/templates/Userlogin.php68
1 files changed, 58 insertions, 10 deletions
diff --git a/includes/templates/Userlogin.php b/includes/templates/Userlogin.php
index ac24800a..deeeb274 100644
--- a/includes/templates/Userlogin.php
+++ b/includes/templates/Userlogin.php
@@ -1,15 +1,14 @@
<?php
/**
- * @addtogroup Templates
+ * @defgroup Templates Templates
+ * @file
+ * @ingroup Templates
*/
if( !defined( 'MEDIAWIKI' ) ) die( -1 );
-/** */
-require_once( 'includes/SkinTemplate.php' );
-
/**
* HTML template for Special:Userlogin form
- * @addtogroup Templates
+ * @ingroup Templates
*/
class UserloginTemplate extends QuickTemplate {
function execute() {
@@ -95,9 +94,18 @@ class UserloginTemplate extends QuickTemplate {
}
/**
- * @addtogroup Templates
+ * @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'] ) {
?>
@@ -198,15 +206,57 @@ class UsercreateTemplate extends QuickTemplate {
/> <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>
@@ -220,5 +270,3 @@ class UsercreateTemplate extends QuickTemplate {
}
}
-
-?>