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