Fixed regex in doMagicLinks (broken since r15976)
[mediawiki.git] / includes / templates / Userlogin.php
blob66368669890fd317bd31dabbcb47ce3feab935f1
1 <?php
2 /**
3 * @package MediaWiki
4 * @subpackage Templates
5 */
6 if( !defined( 'MEDIAWIKI' ) ) die( -1 );
8 /** */
9 require_once( 'includes/SkinTemplate.php' );
11 /**
12 * HTML template for Special:Userlogin form
13 * @package MediaWiki
14 * @subpackage Templates
16 class UserloginTemplate extends QuickTemplate {
17 function execute() {
18 if( $this->data['message'] ) {
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 } ?>
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 value="<?php $this->text('name') ?>" size='20' />
41 </td>
42 </tr>
43 <tr>
44 <td align='right'><label for='wpPassword1'><?php $this->msg('yourpassword') ?>:</label></td>
45 <td align='left'>
46 <input type='password' class='loginPassword' name="wpPassword" id="wpPassword1"
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>";
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 <?php echo $doms ?>
61 </select>
62 </td>
63 </tr>
64 <?php } ?>
65 <tr>
66 <td></td>
67 <td align='left'>
68 <input type='checkbox' name="wpRemember"
69 value="1" id="wpRemember"
70 <?php if( $this->data['remember'] ) { ?>checked="checked"<?php } ?>
71 /> <label for="wpRemember"><?php $this->msg('remembermypassword') ?></label>
72 </td>
73 </tr>
74 <tr>
75 <td></td>
76 <td align='left' style="white-space:nowrap">
77 <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"
78 value="<?php $this->msg('mailmypassword') ?>" />
79 <?php } ?>
80 </td>
81 </tr>
82 </table>
83 <?php if( @$this->haveData( 'uselang' ) ) { ?><input type="hidden" name="uselang" value="<?php $this->text( 'uselang' ); ?>" /><?php } ?>
84 </form>
85 </div>
86 <div id="loginend"><?php $this->msgWiki( 'loginend' ); ?></div>
87 <?php
92 class UsercreateTemplate extends QuickTemplate {
93 function execute() {
94 if( $this->data['message'] ) {
96 <div class="<?php $this->text('messagetype') ?>box">
97 <?php if ( $this->data['messagetype'] == 'error' ) { ?>
98 <h2><?php $this->msg('loginerror') ?>:</h2>
99 <?php } ?>
100 <?php $this->html('message') ?>
101 </div>
102 <div class="visualClear"></div>
103 <?php } ?>
104 <div id="userlogin">
106 <form name="userlogin2" id="userlogin2" method="post" action="<?php $this->text('action') ?>">
107 <h2><?php $this->msg('createaccount') ?></h2>
108 <p id="userloginlink"><?php $this->html('link') ?></p>
109 <?php $this->html('header'); /* pre-table point for form plugins... */ ?>
110 <?php if( @$this->haveData( 'languages' ) ) { ?><div id="languagelinks"><p><?php $this->html( 'languages' ); ?></p></div><?php } ?>
111 <table>
112 <tr>
113 <td align='right'><label for='wpName2'><?php $this->msg('yourname') ?>:</label></td>
114 <td align='left'>
115 <input type='text' class='loginText' name="wpName" id="wpName2"
116 value="<?php $this->text('name') ?>" size='20' />
117 </td>
118 </tr>
119 <tr>
120 <td align='right'><label for='wpPassword2'><?php $this->msg('yourpassword') ?>:</label></td>
121 <td align='left'>
122 <input type='password' class='loginPassword' name="wpPassword" id="wpPassword2"
123 value="<?php $this->text('password') ?>" size='20' />
124 </td>
125 </tr>
126 <?php if( $this->data['usedomain'] ) {
127 $doms = "";
128 foreach( $this->data['domainnames'] as $dom ) {
129 $doms .= "<option>" . htmlspecialchars( $dom ) . "</option>";
132 <tr>
133 <td align='right'><?php $this->msg( 'yourdomainname' ) ?>:</td>
134 <td align='left'>
135 <select name="wpDomain" value="<?php $this->text( 'domain' ) ?>">
136 <?php echo $doms ?>
137 </select>
138 </td>
139 </tr>
140 <?php } ?>
141 <tr>
142 <td align='right'><label for='wpRetype'><?php $this->msg('yourpasswordagain') ?>:</label></td>
143 <td align='left'>
144 <input type='password' class='loginPassword' name="wpRetype" id="wpRetype"
145 value="<?php $this->text('retype') ?>"
146 size='20' />
147 </td>
148 </tr>
149 <tr>
150 <?php if( $this->data['useemail'] ) { ?>
151 <td align='right'><label for='wpEmail'><?php $this->msg('youremail') ?>:</label></td>
152 <td align='left'>
153 <input type='text' class='loginText' name="wpEmail" id="wpEmail"
154 value="<?php $this->text('email') ?>" size='20' />
155 </td>
156 <?php } ?>
157 <?php if( $this->data['userealname'] ) { ?>
158 </tr>
159 <tr>
160 <td align='right'><label for='wpRealName'><?php $this->msg('yourrealname') ?>:</label></td>
161 <td align='left'>
162 <input type='text' class='loginText' name="wpRealName" id="wpRealName"
163 value="<?php $this->text('realname') ?>" size='20' />
164 </td>
165 <?php } ?>
166 </tr>
167 <tr>
168 <td></td>
169 <td align='left'>
170 <input type='checkbox' name="wpRemember"
171 value="1" id="wpRemember"
172 <?php if( $this->data['remember'] ) { ?>checked="checked"<?php } ?>
173 /> <label for="wpRemember"><?php $this->msg('remembermypassword') ?></label>
174 </td>
175 </tr>
176 <tr>
177 <td></td>
178 <td align='left'>
179 <input type='submit' name="wpCreateaccount" id="wpCreateaccount"
180 value="<?php $this->msg('createaccount') ?>" />
181 <?php if( $this->data['createemail'] ) { ?>
182 <input type='submit' name="wpCreateaccountMail" id="wpCreateaccountMail"
183 value="<?php $this->msg('createaccountmail') ?>" />
184 <?php } ?>
185 </td>
186 </tr>
187 </table>
188 <?php
190 if ($this->data['userealname'] || $this->data['useemail']) {
191 echo '<div id="login-sectiontip">';
192 if ( $this->data['useemail'] ) {
193 echo '<div>';
194 $this->msgHtml('prefs-help-email');
195 echo '</div>';
197 if ( $this->data['userealname'] ) {
198 echo '<div>';
199 $this->msgHtml('prefs-help-realname');
200 echo '</div>';
202 echo '</div>';
206 <?php if( @$this->haveData( 'uselang' ) ) { ?><input type="hidden" name="uselang" value="<?php $this->text( 'uselang' ); ?>" /><?php } ?>
207 </form>
208 </div>
209 <div id="signupend"><?php $this->msgWiki( 'signupend' ); ?></div>
210 <?php