953fbd4713901a32e5dba6ba3cdeaf5eb57cbe74
[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 <?php if( @$this->haveData( 'languages' ) ) { ?><div id="languagelinks"><p><?php $this->html( 'languages' ); ?></p></div><?php } ?>
35 <table>
36 <tr>
37 <td align='right'><label for='wpName1'><?php $this->msg('yourname') ?>:</label></td>
38 <td align='left'>
39 <input type='text' class='loginText' name="wpName" id="wpName1"
40 tabindex="1"
41 value="<?php $this->text('name') ?>" size='20' />
42 </td>
43 </tr>
44 <tr>
45 <td align='right'><label for='wpPassword1'><?php $this->msg('yourpassword') ?>:</label></td>
46 <td align='left'>
47 <input type='password' class='loginPassword' name="wpPassword" id="wpPassword1"
48 tabindex="2"
49 value="<?php $this->text('password') ?>" size='20' />
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 name="wpDomain" value="<?php $this->text( 'domain' ) ?>"
62 tabindex="3">
63 <?php echo $doms ?>
64 </select>
65 </td>
66 </tr>
67 <?php } ?>
68 <tr>
69 <td></td>
70 <td align='left'>
71 <input type='checkbox' name="wpRemember"
72 tabindex="4"
73 value="1" id="wpRemember"
74 <?php if( $this->data['remember'] ) { ?>checked="checked"<?php } ?>
75 /> <label for="wpRemember"><?php $this->msg('remembermypassword') ?></label>
76 </td>
77 </tr>
78 <tr>
79 <td></td>
80 <td align='left' style="white-space:nowrap">
81 <input type='submit' name="wpLoginattempt" id="wpLoginattempt" tabindex="5" value="<?php $this->msg('login') ?>" />&nbsp;<?php if( $this->data['useemail'] && $this->data['canreset']) { ?><input type='submit' name="wpMailmypassword" id="wpMailmypassword"
82 tabindex="6"
83 value="<?php $this->msg('mailmypassword') ?>" />
84 <?php } ?>
85 </td>
86 </tr>
87 </table>
88 <?php if( @$this->haveData( 'uselang' ) ) { ?><input type="hidden" name="uselang" value="<?php $this->text( 'uselang' ); ?>" /><?php } ?>
89 </form>
90 </div>
91 <div id="loginend"><?php $this->msgWiki( 'loginend' ); ?></div>
92 <?php
93
94 }
95 }
96
97 class UsercreateTemplate extends QuickTemplate {
98 function execute() {
99 if( $this->data['message'] ) {
100 ?>
101 <div class="<?php $this->text('messagetype') ?>box">
102 <?php if ( $this->data['messagetype'] == 'error' ) { ?>
103 <h2><?php $this->msg('loginerror') ?>:</h2>
104 <?php } ?>
105 <?php $this->html('message') ?>
106 </div>
107 <div class="visualClear"></div>
108 <?php } ?>
109 <div id="userlogin">
110
111 <form name="userlogin2" id="userlogin2" method="post" action="<?php $this->text('action') ?>">
112 <h2><?php $this->msg('createaccount') ?></h2>
113 <p id="userloginlink"><?php $this->html('link') ?></p>
114 <?php $this->html('header'); /* pre-table point for form plugins... */ ?>
115 <?php if( @$this->haveData( 'languages' ) ) { ?><div id="languagelinks"><p><?php $this->html( 'languages' ); ?></p></div><?php } ?>
116 <table>
117 <tr>
118 <td align='right'><label for='wpName2'><?php $this->msg('yourname') ?>:</label></td>
119 <td align='left'>
120 <input type='text' class='loginText' name="wpName" id="wpName2"
121 tabindex="1"
122 value="<?php $this->text('name') ?>" size='20' />
123 </td>
124 </tr>
125 <tr>
126 <td align='right'><label for='wpPassword2'><?php $this->msg('yourpassword') ?>:</label></td>
127 <td align='left'>
128 <input type='password' class='loginPassword' name="wpPassword" id="wpPassword2"
129 tabindex="2"
130 value="<?php $this->text('password') ?>" size='20' />
131 </td>
132 </tr>
133 <?php if( $this->data['usedomain'] ) {
134 $doms = "";
135 foreach( $this->data['domainnames'] as $dom ) {
136 $doms .= "<option>" . htmlspecialchars( $dom ) . "</option>";
137 }
138 ?>
139 <tr>
140 <td align='right'><?php $this->msg( 'yourdomainname' ) ?>:</td>
141 <td align='left'>
142 <select name="wpDomain" value="<?php $this->text( 'domain' ) ?>"
143 tabindex="3">
144 <?php echo $doms ?>
145 </select>
146 </td>
147 </tr>
148 <?php } ?>
149 <tr>
150 <td align='right'><label for='wpRetype'><?php $this->msg('yourpasswordagain') ?>:</label></td>
151 <td align='left'>
152 <input type='password' class='loginPassword' name="wpRetype" id="wpRetype"
153 tabindex="4"
154 value="<?php $this->text('retype') ?>"
155 size='20' />
156 </td>
157 </tr>
158 <tr>
159 <?php if( $this->data['useemail'] ) { ?>
160 <td align='right'><label for='wpEmail'><?php $this->msg('youremail') ?></label></td>
161 <td align='left'>
162 <input type='text' class='loginText' name="wpEmail" id="wpEmail"
163 tabindex="5"
164 value="<?php $this->text('email') ?>" size='20' />
165 </td>
166 <?php } ?>
167 <?php if( $this->data['userealname'] ) { ?>
168 </tr>
169 <tr>
170 <td align='right'><label for='wpRealName'><?php $this->msg('yourrealname') ?></label></td>
171 <td align='left'>
172 <input type='text' class='loginText' name="wpRealName" id="wpRealName"
173 tabindex="6"
174 value="<?php $this->text('realname') ?>" size='20' />
175 </td>
176 <?php } ?>
177 </tr>
178 <tr>
179 <td></td>
180 <td align='left'>
181 <input type='checkbox' name="wpRemember"
182 tabindex="7"
183 value="1" id="wpRemember"
184 <?php if( $this->data['remember'] ) { ?>checked="checked"<?php } ?>
185 /> <label for="wpRemember"><?php $this->msg('remembermypassword') ?></label>
186 </td>
187 </tr>
188 <tr>
189 <td></td>
190 <td align='left'>
191 <input type='submit' name="wpCreateaccount" id="wpCreateaccount"
192 tabindex="8"
193 value="<?php $this->msg('createaccount') ?>" />
194 <?php if( $this->data['createemail'] ) { ?>
195 <input type='submit' name="wpCreateaccountMail" id="wpCreateaccountMail"
196 tabindex="9"
197 value="<?php $this->msg('createaccountmail') ?>" />
198 <?php } ?>
199 </td>
200 </tr>
201 </table>
202 <?php
203
204 if ($this->data['userealname'] || $this->data['useemail']) {
205 echo '<div id="login-sectiontip">';
206 if ( $this->data['useemail'] ) {
207 echo '<div>';
208 $this->msgHtml('prefs-help-email');
209 echo '</div>';
210 }
211 if ( $this->data['userealname'] ) {
212 echo '<div>';
213 $this->msgHtml('prefs-help-realname');
214 echo '</div>';
215 }
216 echo '</div>';
217 }
218
219 ?>
220 <?php if( @$this->haveData( 'uselang' ) ) { ?><input type="hidden" name="uselang" value="<?php $this->text( 'uselang' ); ?>" /><?php } ?>
221 </form>
222 </div>
223 <div id="signupend"><?php $this->msgWiki( 'signupend' ); ?></div>
224 <?php
225
226 }
227 }
228
229 ?>