3 * @defgroup Templates Templates
7 if( !defined( 'MEDIAWIKI' ) ) die( -1 );
10 * HTML template for Special:Userlogin form
13 class UserloginTemplate
extends QuickTemplate
{
15 if( $this->data
['message'] ) {
17 <div
class="<?php $this->text('messagetype') ?>box">
18 <?php
if ( $this->data
['messagetype'] == 'error' ) { ?
>
19 <h2
><?php
$this->msg('loginerror') ?
></h2
>
21 <?php
$this->html('message') ?
>
23 <div
class="visualClear"></div
>
26 <div id
="loginstart"><?php
$this->msgWiki( 'loginstart' ); ?
></div
>
27 <div id
="userloginForm">
28 <form name
="userlogin" method
="post" action
="<?php $this->text('action') ?>">
29 <h2
><?php
$this->msg('login') ?
></h2
>
30 <p id
="userloginlink"><?php
$this->html('link') ?
></p
>
31 <?php
$this->html('header'); /* pre-table point for form plugins... */ ?
>
32 <div id
="userloginprompt"><?php
$this->msgWiki('loginprompt') ?
></div
>
33 <?php
if( @$this->haveData( 'languages' ) ) { ?
><div id
="languagelinks"><p
><?php
$this->html( 'languages' ); ?
></p
></div
><?php
} ?
>
36 <td
class="mw-label"><label
for='wpName1'><?php
$this->msg('yourname') ?
></label
></td
>
38 <input type
='text' class='loginText' name
="wpName" id
="wpName1"
40 value
="<?php $this->text('name') ?>" size
='20' />
44 <td
class="mw-label"><label
for='wpPassword1'><?php
$this->msg('yourpassword') ?
></label
></td
>
46 <input type
='password' class='loginPassword' name
="wpPassword" id
="wpPassword1"
51 <?php
if( $this->data
['usedomain'] ) {
53 foreach( $this->data
['domainnames'] as $dom ) {
54 $doms .= "<option>" . htmlspecialchars( $dom ) . "</option>";
57 <tr id
="userDomainSection">
58 <td
class="mw-label"><?php
$this->msg( 'yourdomainname' ) ?
></td
>
60 <select name
="wpDomain" value
="<?php $this->text( 'domain' ) ?>"
67 if( $this->data
['canremember'] ) { ?
>
71 <input type
='checkbox' name
="wpRemember"
73 value
="1" id
="wpRemember"
74 <?php
if( $this->data
['remember'] ) { ?
>checked
="checked"<?php
} ?
>
75 /> <label
for="wpRemember"><?php
$this->msg('remembermypassword') ?
></label
>
81 <td
class="mw-submit">
82 <input type
='submit' name
="wpLoginattempt" id
="wpLoginattempt" tabindex
="5" value
="<?php $this->msg('login') ?>" /> 
;<?php
if( $this->data
['useemail'] && $this->data
['canreset']) { ?
><input type
='submit' name
="wpMailmypassword" id
="wpMailmypassword"
84 value
="<?php $this->msg('mailmypassword') ?>" />
89 <?php
if( @$this->haveData( 'uselang' ) ) { ?
><input type
="hidden" name
="uselang" value
="<?php $this->text( 'uselang' ); ?>" /><?php
} ?
>
92 <div id
="loginend"><?php
$this->msgWiki( 'loginend' ); ?
></div
>
101 class UsercreateTemplate
extends QuickTemplate
{
102 function addInputItem( $name, $value, $type, $msg ) {
103 $this->data
['extraInput'][] = array(
112 if( $this->data
['message'] ) {
114 <div
class="<?php $this->text('messagetype') ?>box">
115 <?php
if ( $this->data
['messagetype'] == 'error' ) { ?
>
116 <h2
><?php
$this->msg('loginerror') ?
></h2
>
118 <?php
$this->html('message') ?
>
120 <div
class="visualClear"></div
>
124 <form name
="userlogin2" id
="userlogin2" method
="post" action
="<?php $this->text('action') ?>">
125 <h2
><?php
$this->msg('createaccount') ?
></h2
>
126 <p id
="userloginlink"><?php
$this->html('link') ?
></p
>
127 <?php
$this->html('header'); /* pre-table point for form plugins... */ ?
>
128 <?php
if( @$this->haveData( 'languages' ) ) { ?
><div id
="languagelinks"><p
><?php
$this->html( 'languages' ); ?
></p
></div
><?php
} ?
>
131 <td
class="mw-label"><label
for='wpName2'><?php
$this->msg('yourname') ?
></label
></td
>
132 <td
class="mw-input">
133 <input type
='text' class='loginText' name
="wpName" id
="wpName2"
135 value
="<?php $this->text('name') ?>" size
='20' />
139 <td
class="mw-label"><label
for='wpPassword2'><?php
$this->msg('yourpassword') ?
></label
></td
>
140 <td
class="mw-input">
141 <input type
='password' class='loginPassword' name
="wpPassword" id
="wpPassword2"
143 value
="" size
='20' />
146 <?php
if( $this->data
['usedomain'] ) {
148 foreach( $this->data
['domainnames'] as $dom ) {
149 $doms .= "<option>" . htmlspecialchars( $dom ) . "</option>";
153 <td
class="mw-label"><?php
$this->msg( 'yourdomainname' ) ?
></td
>
154 <td
class="mw-input">
155 <select name
="wpDomain" value
="<?php $this->text( 'domain' ) ?>"
163 <td
class="mw-label"><label
for='wpRetype'><?php
$this->msg('yourpasswordagain') ?
></label
></td
>
164 <td
class="mw-input">
165 <input type
='password' class='loginPassword' name
="wpRetype" id
="wpRetype"
172 <?php
if( $this->data
['useemail'] ) { ?
>
173 <td
class="mw-label"><label
for='wpEmail'><?php
$this->msg('youremail') ?
></label
></td
>
174 <td
class="mw-input">
175 <input type
='text' class='loginText' name
="wpEmail" id
="wpEmail"
177 value
="<?php $this->text('email') ?>" size
='20' />
178 <div
class="prefsectiontip">
179 <?php
if( $this->data
['emailrequired'] ) {
180 $this->msgWiki('prefs-help-email-required');
182 $this->msgWiki('prefs-help-email');
187 <?php
if( $this->data
['userealname'] ) { ?
>
190 <td
class="mw-label"><label
for='wpRealName'><?php
$this->msg('yourrealname') ?
></label
></td
>
191 <td
class="mw-input">
192 <input type
='text' class='loginText' name
="wpRealName" id
="wpRealName"
194 value
="<?php $this->text('realname') ?>" size
='20' />
195 <div
class="prefsectiontip">
196 <?php
$this->msgWiki('prefs-help-realname'); ?
>
201 <?php
if( $this->data
['canremember'] ) { ?
>
204 <td
class="mw-input">
205 <input type
='checkbox' name
="wpRemember"
207 value
="1" id
="wpRemember"
208 <?php
if( $this->data
['remember'] ) { ?
>checked
="checked"<?php
} ?
>
209 /> <label
for="wpRemember"><?php
$this->msg('remembermypassword') ?
></label
>
215 if ( isset( $this->data
['extraInput'] ) && is_array( $this->data
['extraInput'] ) ) {
216 foreach ( $this->data
['extraInput'] as $inputItem ) { ?
>
219 if ( !empty( $inputItem['msg'] ) && $inputItem['type'] != 'checkbox' ) {
220 ?
><td
class="mw-label"><label
for="<?php
221 echo htmlspecialchars( $inputItem['name'] ); ?>"><?php
222 $this->msgWiki( $inputItem['msg'] ) ?
></label
><?php
227 <td
class="mw-input">
228 <input type
="<?php echo htmlspecialchars( $inputItem['type'] ) ?>" name
="<?php
229 echo htmlspecialchars( $inputItem['name'] ); ?>"
230 tabindex
="<?php echo $tabIndex++; ?>"
232 if ( $inputItem['type'] != 'checkbox' ) {
233 echo htmlspecialchars( $inputItem['value'] );
237 ?>" id
="<?php echo htmlspecialchars( $inputItem['name'] ); ?>"
239 if ( $inputItem['type'] == 'checkbox' && !empty( $inputItem['value'] ) )
240 echo 'checked="checked"';
242 if ( $inputItem['type'] == 'checkbox' && !empty( $inputItem['msg'] ) ) {
244 <label
for="<?php echo htmlspecialchars( $inputItem['name'] ); ?>"><?php
245 $this->msg( $inputItem['msg'] ) ?
></label
><?php
257 <td
class="mw-submit">
258 <input type
='submit' name
="wpCreateaccount" id
="wpCreateaccount"
259 tabindex
="<?php echo $tabIndex++; ?>"
260 value
="<?php $this->msg('createaccount') ?>" />
261 <?php
if( $this->data
['createemail'] ) { ?
>
262 <input type
='submit' name
="wpCreateaccountMail" id
="wpCreateaccountMail"
263 tabindex
="<?php echo $tabIndex++; ?>"
264 value
="<?php $this->msg('createaccountmail') ?>" />
269 <?php
if( @$this->haveData( 'uselang' ) ) { ?
><input type
="hidden" name
="uselang" value
="<?php $this->text( 'uselang' ); ?>" /><?php
} ?
>
272 <div id
="signupend"><?php
$this->msgWiki( 'signupend' ); ?
></div
>