* (bug 814) Integrate AuthPlugin changes to support Ryan Lane's external
[lhc/web/wiklou.git] / includes / templates / Userlogin.php
1 <?php
2 /**
3 * @package MediaWiki
4 * @subpackage Templates
5 */
6 if( !defined( 'MEDIAWIKI' ) ) die();
7
8 /** */
9 require_once( 'includes/SkinTemplate.php' );
10
11 /**
12 * HTML template for Special:Userlogin form
13 * @package MediaWiki
14 * @subpackage Templates
15 */
16 class UserloginTemplate extends QuickTemplate {
17 function execute() {
18 if( $this->data['error'] ) {
19 ?>
20 <h2><?php $this->msg('loginerror') ?>:</h2>
21 <p class='error'><?php $this->html('error') ?></p>
22 <?php } else { ?>
23 <h2><?php $this->msg('login' ) ?>:</h2>
24 <?php $this->msgWiki('loginprompt') ?>
25 <?php } ?>
26 <form name="userlogin" id="userlogin" method="post" action="<?php $this->text('action') ?>">
27 <table border='0'>
28 <tr>
29 <td align='right'><label for='wpName'><?php $this->msg('yourname') ?>:</label></td>
30 <td align='left'>
31 <input tabindex='1' type='text' name="wpName" id="wpName"
32 value="<?php $this->text('name') ?>" size='20' />
33 </td>
34 <td align='left'>
35 <input tabindex='3' type='checkbox' name="wpRemember"
36 value="1" id="wpRemember"
37 <?php if( $this->data['remember'] ) { ?>checked="checked"<?php } ?>
38 /><label for="wpRemember"><?php $this->msg('remembermypassword') ?></label>
39 </td>
40 </tr>
41 <tr>
42 <td align='right'><label for='wpPassword'><?php $this->msg('yourpassword') ?>:</label></td>
43 <td align='left'>
44 <input tabindex='2' type='password' name="wpPassword" id="wpPassword"
45 value="<?php $this->text('password') ?>" size='20' />
46 </td>
47 <td align='left'>
48 <input tabindex='4' type='submit' name="wpLoginattempt"
49 value="<?php $this->msg('login') ?>" />
50 </td>
51 </tr>
52 <?php if( $this->data['usedomain'] ) {
53 $doms = "";
54 foreach( $this->data['domainnames'] as $dom ) {
55 $doms .= "<option>" . htmlspecialchars( $dom ) . "</option>";
56 }
57 ?>
58 <tr>
59 <td align='right'><?php $this->msg( 'yourdomainname' ) ?>:</td>
60 <td align='left'>
61 <select tabindex='11' name="wpDomain" value="<?php $this->text( 'domain' ) ?>">
62 <?php echo $doms ?>
63 </select>
64 </td>
65 </tr>
66 <?php } ?>
67 <?php if( $this->data['create'] ) { ?>
68 <tr>
69 <td colspan='3'>&nbsp;</td>
70 </tr>
71 <tr>
72 <td align='right'><label for='wpRetype'><?php $this->msg('yourpasswordagain') ?>:</label></td>
73 <td align='left'>
74 <input tabindex='5' type='password' name="wpRetype" id="wpRetype"
75 value="<?php $this->text('retype') ?>"
76 size='20' />
77 </td>
78 <td><?php $this->msg('newusersonly') ?></td>
79 </tr>
80 <tr>
81 <?php if( $this->data['useemail'] ) { ?>
82 <td align='right'><label for='wpEmail'><?php $this->msg('youremail') ?>:</label></td>
83 <td align='left'>
84 <input tabindex='7' type='text' name="wpEmail" id="wpEmail"
85 value="<?php $this->text('email') ?>" size='20' />
86 </td>
87 <?php } ?>
88 <?php if( $this->data['userealname'] ) { ?>
89 </tr>
90 <tr>
91 <td align='right'><label for='wpRealName'><?php $this->msg('yourrealname') ?>:</label></td>
92 <td align='left'>
93 <input tabindex='8' type='text' name="wpRealName" id="wpRealName"
94 value="<?php $this->text('realname') ?>" size='20' />
95 </td>
96 <?php } ?>
97 <td align='left'>
98 <input tabindex='9' type='submit' name="wpCreateaccount"
99 value="<?php $this->msg('createaccount') ?>" />
100 <?php if( $this->data['createemail'] ) { ?>
101 <input tabindex='6' type='submit' name="wpCreateaccountMail"
102 value="<?php $this->msg('createaccountmail') ?>" />
103 <?php } ?>
104 </td>
105 </tr>
106 <?php } ?>
107 <?php if( $this->data['useemail'] ) { ?>
108 <tr>
109 <td colspan='3'>&nbsp;</td>
110 </tr>
111 <tr>
112 <td colspan='3' align='left'>
113 <p>
114 <?php $this->msgHtml( 'emailforlost' ) ?><br />
115 <input tabindex='10' type='submit' name="wpMailmypassword"
116 value="<?php $this->msg('mailmypassword') ?>" />
117 </p>
118 </td>
119 </tr>
120 <?php } ?>
121 </table>
122 </form>
123 <?php
124 $this->msgWiki( 'loginend' );
125 }
126 }
127
128 ?>