* remove end of line whitespace
[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="loginstart"><?php $this->msgWiki( 'loginstart' ); ?></div>
28 <div id="userloginForm">
29 <form name="userlogin" method="post" action="<?php $this->text('action') ?>">
30 <h2><?php $this->msg('login') ?></h2>
31 <p id="userloginlink"><?php $this->html('link') ?></p>
32 <?php $this->html('header'); /* pre-table point for form plugins... */ ?>
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 class="mw-label"><label for='wpName1'><?php $this->msg('yourname') ?></label></td>
38 <td class="mw-input">
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 class="mw-label"><label for='wpPassword1'><?php $this->msg('yourpassword') ?></label></td>
46 <td class="mw-input">
47 <input type='password' class='loginPassword' name="wpPassword" id="wpPassword1"
48 tabindex="2"
49 value="" 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 class="mw-label"><?php $this->msg( 'yourdomainname' ) ?></td>
60 <td class="mw-input">
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 class="mw-input">
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 class="mw-submit">
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 /**
98 * @addtogroup Templates
99 */
100 class UsercreateTemplate extends QuickTemplate {
101 function execute() {
102 if( $this->data['message'] ) {
103 ?>
104 <div class="<?php $this->text('messagetype') ?>box">
105 <?php if ( $this->data['messagetype'] == 'error' ) { ?>
106 <h2><?php $this->msg('loginerror') ?>:</h2>
107 <?php } ?>
108 <?php $this->html('message') ?>
109 </div>
110 <div class="visualClear"></div>
111 <?php } ?>
112 <div id="userlogin">
113
114 <form name="userlogin2" id="userlogin2" method="post" action="<?php $this->text('action') ?>">
115 <h2><?php $this->msg('createaccount') ?></h2>
116 <p id="userloginlink"><?php $this->html('link') ?></p>
117 <?php $this->html('header'); /* pre-table point for form plugins... */ ?>
118 <?php if( @$this->haveData( 'languages' ) ) { ?><div id="languagelinks"><p><?php $this->html( 'languages' ); ?></p></div><?php } ?>
119 <table>
120 <tr>
121 <td class="mw-label"><label for='wpName2'><?php $this->msg('yourname') ?></label></td>
122 <td class="mw-input">
123 <input type='text' class='loginText' name="wpName" id="wpName2"
124 tabindex="1"
125 value="<?php $this->text('name') ?>" size='20' />
126 </td>
127 </tr>
128 <tr>
129 <td class="mw-label"><label for='wpPassword2'><?php $this->msg('yourpassword') ?></label></td>
130 <td class="mw-input">
131 <input type='password' class='loginPassword' name="wpPassword" id="wpPassword2"
132 tabindex="2"
133 value="" size='20' />
134 </td>
135 </tr>
136 <?php if( $this->data['usedomain'] ) {
137 $doms = "";
138 foreach( $this->data['domainnames'] as $dom ) {
139 $doms .= "<option>" . htmlspecialchars( $dom ) . "</option>";
140 }
141 ?>
142 <tr>
143 <td class="mw-label"><?php $this->msg( 'yourdomainname' ) ?></td>
144 <td class="mw-input">
145 <select name="wpDomain" value="<?php $this->text( 'domain' ) ?>"
146 tabindex="3">
147 <?php echo $doms ?>
148 </select>
149 </td>
150 </tr>
151 <?php } ?>
152 <tr>
153 <td class="mw-label"><label for='wpRetype'><?php $this->msg('yourpasswordagain') ?></label></td>
154 <td class="mw-input">
155 <input type='password' class='loginPassword' name="wpRetype" id="wpRetype"
156 tabindex="4"
157 value=""
158 size='20' />
159 </td>
160 </tr>
161 <tr>
162 <?php if( $this->data['useemail'] ) { ?>
163 <td class="mw-label"><label for='wpEmail'><?php $this->msg('youremail') ?></label></td>
164 <td class="mw-input">
165 <input type='text' class='loginText' name="wpEmail" id="wpEmail"
166 tabindex="5"
167 value="<?php $this->text('email') ?>" size='20' />
168 <div class="prefsectiontip">
169 <?php if( $this->data['emailrequired'] ) {
170 $this->msgWiki('prefs-help-email-required');
171 } else {
172 $this->msgWiki('prefs-help-email');
173 } ?>
174 </div>
175 </td>
176 <?php } ?>
177 <?php if( $this->data['userealname'] ) { ?>
178 </tr>
179 <tr>
180 <td class="mw-label"><label for='wpRealName'><?php $this->msg('yourrealname') ?></label></td>
181 <td class="mw-input">
182 <input type='text' class='loginText' name="wpRealName" id="wpRealName"
183 tabindex="6"
184 value="<?php $this->text('realname') ?>" size='20' />
185 <div class="prefsectiontip">
186 <?php $this->msgWiki('prefs-help-realname'); ?>
187 </div>
188 </td>
189 <?php } ?>
190 </tr>
191 <tr>
192 <td></td>
193 <td class="mw-input">
194 <input type='checkbox' name="wpRemember"
195 tabindex="7"
196 value="1" id="wpRemember"
197 <?php if( $this->data['remember'] ) { ?>checked="checked"<?php } ?>
198 /> <label for="wpRemember"><?php $this->msg('remembermypassword') ?></label>
199 </td>
200 </tr>
201 <tr>
202 <td></td>
203 <td class="mw-submit">
204 <input type='submit' name="wpCreateaccount" id="wpCreateaccount"
205 tabindex="8"
206 value="<?php $this->msg('createaccount') ?>" />
207 <?php if( $this->data['createemail'] ) { ?>
208 <input type='submit' name="wpCreateaccountMail" id="wpCreateaccountMail"
209 tabindex="9"
210 value="<?php $this->msg('createaccountmail') ?>" />
211 <?php } ?>
212 </td>
213 </tr>
214 </table>
215 <?php if( @$this->haveData( 'uselang' ) ) { ?><input type="hidden" name="uselang" value="<?php $this->text( 'uselang' ); ?>" /><?php } ?>
216 </form>
217 </div>
218 <div id="signupend"><?php $this->msgWiki( 'signupend' ); ?></div>
219 <?php
220
221 }
222 }