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