(bug 6174) Remove redundant "emailforlost" message
[lhc/web/wiklou.git] / includes / templates / Userlogin.php
1 <?php
2 /**
3 * @package MediaWiki
4 * @subpackage Templates
5 */
6 if( !defined( 'MEDIAWIKI' ) ) die( -1 );
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['message'] ) {
19 ?>
20 <div class="<?php $this->text('messagetype') ?>box">
21 <?php if ( $this->data['messagetype'] == 'error' ) { ?>
22 <h2><?php $this->msg('loginerror') ?>:</h2>
23 <?php } ?>
24 <?php $this->html('message') ?>
25 </div>
26 <div class="visualClear"></div>
27 <?php } ?>
28
29 <div id="userloginForm">
30 <form name="userlogin" method="post" action="<?php $this->text('action') ?>">
31 <h2><?php $this->msg('login') ?></h2>
32 <p id="userloginlink"><?php $this->html('link') ?></p>
33 <div id="userloginprompt"><?php $this->msgWiki('loginprompt') ?></div>
34 <table>
35 <tr>
36 <td align='right'><label for='wpName1'><?php $this->msg('yourname') ?>:</label></td>
37 <td align='left'>
38 <input type='text' class='loginText' name="wpName" id="wpName1"
39 value="<?php $this->text('name') ?>" size='20' />
40 </td>
41 </tr>
42 <tr>
43 <td align='right'><label for='wpPassword1'><?php $this->msg('yourpassword') ?>:</label></td>
44 <td align='left'>
45 <input type='password' class='loginPassword' name="wpPassword" id="wpPassword1"
46 value="<?php $this->text('password') ?>" size='20' />
47 </td>
48 </tr>
49 <?php if( $this->data['usedomain'] ) {
50 $doms = "";
51 foreach( $this->data['domainnames'] as $dom ) {
52 $doms .= "<option>" . htmlspecialchars( $dom ) . "</option>";
53 }
54 ?>
55 <tr>
56 <td align='right'><?php $this->msg( 'yourdomainname' ) ?>:</td>
57 <td align='left'>
58 <select name="wpDomain" value="<?php $this->text( 'domain' ) ?>">
59 <?php echo $doms ?>
60 </select>
61 </td>
62 </tr>
63 <?php } ?>
64 <tr>
65 <td></td>
66 <td align='left'>
67 <input type='checkbox' name="wpRemember"
68 value="1" id="wpRemember"
69 <?php if( $this->data['remember'] ) { ?>checked="checked"<?php } ?>
70 /> <label for="wpRemember"><?php $this->msg('remembermypassword') ?></label>
71 </td>
72 </tr>
73 <tr>
74 <td></td>
75 <td align='left' style="white-space:nowrap">
76 <input type='submit' name="wpLoginattempt" id="wpLoginattempt" value="<?php $this->msg('login') ?>" />&nbsp;<?php if( $this->data['useemail'] ) { ?><input type='submit' name="wpMailmypassword" id="wpMailmypassword"
77 value="<?php $this->msg('mailmypassword') ?>" />
78 <?php } ?>
79 </td>
80 </tr>
81 </table>
82 </form>
83 </div>
84 <div id="loginend"><?php $this->msgWiki( 'loginend' ); ?></div>
85 <?php
86
87 }
88 }
89
90 class UsercreateTemplate extends QuickTemplate {
91 function execute() {
92 if( $this->data['message'] ) {
93 ?>
94 <div class="<?php $this->text('messagetype') ?>box">
95 <?php if ( $this->data['messagetype'] == 'error' ) { ?>
96 <h2><?php $this->msg('loginerror') ?>:</h2>
97 <?php } ?>
98 <?php $this->html('message') ?>
99 </div>
100 <div class="visualClear"></div>
101 <?php } ?>
102 <div id="userlogin">
103
104 <?php if( $this->data['create'] ) { ?>
105 <form name="userlogin2" id="userlogin2" method="post" action="<?php $this->text('action') ?>">
106 <h2><?php $this->msg('createaccount') ?></h2>
107 <p id="userloginlink"><?php $this->html('link') ?></p>
108 <?php $this->html('header'); /* pre-table point for form plugins... */ ?>
109 <table>
110 <tr>
111 <td align='right'><label for='wpName2'><?php $this->msg('yourname') ?>:</label></td>
112 <td align='left'>
113 <input type='text' class='loginText' name="wpName" id="wpName2"
114 value="<?php $this->text('name') ?>" size='20' />
115 </td>
116 </tr>
117 <tr>
118 <td align='right'><label for='wpPassword2'><?php $this->msg('yourpassword') ?>:</label></td>
119 <td align='left'>
120 <input type='password' class='loginPassword' name="wpPassword" id="wpPassword2"
121 value="<?php $this->text('password') ?>" size='20' />
122 </td>
123 </tr>
124 <?php if( $this->data['usedomain'] ) {
125 $doms = "";
126 foreach( $this->data['domainnames'] as $dom ) {
127 $doms .= "<option>" . htmlspecialchars( $dom ) . "</option>";
128 }
129 ?>
130 <tr>
131 <td align='right'><?php $this->msg( 'yourdomainname' ) ?>:</td>
132 <td align='left'>
133 <select name="wpDomain" value="<?php $this->text( 'domain' ) ?>">
134 <?php echo $doms ?>
135 </select>
136 </td>
137 </tr>
138 <?php } ?>
139 <tr>
140 <td align='right'><label for='wpRetype'><?php $this->msg('yourpasswordagain') ?>:</label></td>
141 <td align='left'>
142 <input type='password' class='loginPassword' name="wpRetype" id="wpRetype"
143 value="<?php $this->text('retype') ?>"
144 size='20' />
145 </td>
146 </tr>
147 <tr>
148 <?php if( $this->data['useemail'] ) { ?>
149 <td align='right'><label for='wpEmail'><?php $this->msg('youremail') ?>:</label></td>
150 <td align='left'>
151 <input type='text' class='loginText' name="wpEmail" id="wpEmail"
152 value="<?php $this->text('email') ?>" size='20' />
153 </td>
154 <?php } ?>
155 <?php if( $this->data['userealname'] ) { ?>
156 </tr>
157 <tr>
158 <td align='right'><label for='wpRealName'><?php $this->msg('yourrealname') ?>:</label></td>
159 <td align='left'>
160 <input type='text' class='loginText' name="wpRealName" id="wpRealName"
161 value="<?php $this->text('realname') ?>" size='20' />
162 </td>
163 <?php } ?>
164 </tr>
165 <tr>
166 <td></td>
167 <td align='left'>
168 <input type='checkbox' name="wpRemember"
169 value="1" id="wpRemember"
170 <?php if( $this->data['remember'] ) { ?>checked="checked"<?php } ?>
171 /> <label for="wpRemember"><?php $this->msg('remembermypassword') ?></label>
172 </td>
173 </tr>
174 <tr>
175 <td></td>
176 <td align='left'>
177 <input type='submit' name="wpCreateaccount" id="wpCreateaccount"
178 value="<?php $this->msg('createaccount') ?>" />
179 <?php if( $this->data['createemail'] ) { ?>
180 <input type='submit' name="wpCreateaccountMail" id="wpCreateaccountMail"
181 value="<?php $this->msg('createaccountmail') ?>" />
182 <?php } ?>
183 </td>
184 </tr>
185 <?php } ?>
186 </table>
187 <?php
188
189 if ($this->data['userealname'] || $this->data['useemail']) {
190 echo '<div id="login-sectiontip">';
191 if ( $this->data['useemail'] ) {
192 echo '<div>';
193 $this->msg('prefs-help-email');
194 echo '</div>';
195 }
196 if ( $this->data['userealname'] ) {
197 echo '<div>';
198 $this->msg('prefs-help-realname');
199 echo '</div>';
200 }
201 echo '</div>';
202 }
203
204 ?>
205 </form>
206 </div>
207 <div id="signupend"><?php $this->msgWiki( 'signupend' ); ?></div>
208 <?php
209
210 }
211 }
212
213 ?>