* (bug 1477) hide details of SQL error messages by default
[mediawiki.git] / includes / templates / Userlogin.php
blob44999ed9129f8d45d8fbaa6c07aa9fae0d047ada
1 <?php
2 /**
3 * @package MediaWiki
4 * @subpackage Templates
5 */
6 if( !defined( 'MEDIAWIKI' ) ) die();
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['error'] ) {
20 <h2><?php $this->msg('loginerror') ?>:</h2>
21 <p class='error'><?php $this->html('error') ?></p>
22 <?php } else { ?>
23 <h2><?php $this->msg('login' ) ?>:</h2>
24 <?php $this->msgWiki('loginprompt') ?>
25 <?php } ?>
26 <form name="userlogin" id="userlogin" method="post" action="<?php $this->text('action') ?>">
27 <table border='0'>
28 <tr>
29 <td align='right'><label for='wpName'><?php $this->msg('yourname') ?>:</label></td>
30 <td align='left'>
31 <input tabindex='1' type='text' name="wpName" id="wpName"
32 value="<?php $this->text('name') ?>" size='20' />
33 </td>
34 <td align='left'>
35 <input tabindex='3' type='submit' name="wpLoginattempt"
36 value="<?php $this->msg('login') ?>" />
37 </td>
38 </tr>
39 <tr>
40 <td align='right'><label for='wpPassword'><?php $this->msg('yourpassword') ?>:</label></td>
41 <td align='left'>
42 <input tabindex='2' type='password' name="wpPassword" id="wpPassword"
43 value="<?php $this->text('password') ?>" size='20' />
44 </td>
45 <td align='left'>
46 <input tabindex='4' type='checkbox' name="wpRemember"
47 value="1" id="wpRemember"
48 <?php if( $this->data['remember'] ) { ?>checked="checked"<?php } ?>
49 /><label for="wpRemember"><?php $this->msg('remembermypassword') ?></label>
50 </td>
51 </tr>
52 <?php if( $this->data['create'] ) { ?>
53 <tr>
54 <td colspan='3'>&nbsp;</td>
55 </tr>
56 <tr>
57 <td align='right'><label for='wpRetype'><?php $this->msg('yourpasswordagain') ?>:</label></td>
58 <td align='left'>
59 <input tabindex='5' type='password' name="wpRetype" id="wpRetype"
60 value="<?php $this->text('retype') ?>"
61 size='20' />
62 </td>
63 <td><?php $this->msg('newusersonly') ?></td>
64 </tr>
65 <tr>
66 <?php if( $this->data['useemail'] ) { ?>
67 <td align='right'><label for='wpEmail'><?php $this->msg('youremail') ?>:</label></td>
68 <td align='left'>
69 <input tabindex='7' type='text' name="wpEmail" id="wpEmail"
70 value="<?php $this->text('email') ?>" size='20' />
71 </td>
72 <?php } ?>
73 <?php if( $this->data['userealname'] ) { ?>
74 </tr>
75 <tr>
76 <td align='right'><label for='wpRealName'><?php $this->msg('yourrealname') ?>:</label></td>
77 <td align='left'>
78 <input tabindex='8' type='text' name="wpRealName" id="wpRealName"
79 value="<?php $this->text('realname') ?>" size='20' />
80 </td>
81 <?php } ?>
82 <td align='left'>
83 <input tabindex='9' type='submit' name="wpCreateaccount"
84 value="<?php $this->msg('createaccount') ?>" />
85 <?php if( $this->data['createemail'] ) { ?>
86 <input tabindex='6' type='submit' name="wpCreateaccountMail"
87 value="<?php $this->msg('createaccountmail') ?>" />
88 <?php } ?>
89 </td>
90 </tr>
91 <?php } ?>
92 <?php if( $this->data['useemail'] ) { ?>
93 <tr>
94 <td colspan='3'>&nbsp;</td>
95 </tr>
96 <tr>
97 <td colspan='3' align='left'>
98 <p>
99 <?php $this->msgHtml( 'emailforlost' ) ?><br />
100 <input tabindex='10' type='submit' name="wpMailmypassword"
101 value="<?php if ( $this->data['useemailauthent'] ) {
102 $this->msg('mailmypasswordauthent') ?>" />
103 <?php } else {
104 $this->msg('mailmypassword') ?>" />
105 <?php } ?>
106 </p>
107 </td>
108 </tr>
109 <?php } ?>
110 </table>
111 </form>
112 <?php
113 $this->msgWiki( 'loginend' );