]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/default/templates/login.tmpl
Refactor/cleanup of login code continues.
[SourceForge/phpwiki.git] / themes / default / templates / login.tmpl
1 <?php // -*-html-*- ?>
2 <!-- $Id: login.tmpl,v 1.4 2002-01-23 05:10:22 dairiki Exp $ -->
3 <!-- The login form -->
4
5 <?php if ($FAILURE_MESSAGE) { ?>
6   <h2><?=_("Signin Failed")?></h2>
7   <p><?=$FAILURE_MESSAGE?></p>
8   <hr noshade="noshade" />
9 <?php } ?>
10
11 <?php if (ALLOW_BOGO_LOGIN && $require_level <= WIKIAUTH_BOGO) { ?>
12   <p>You may sign in using any WikiWord as a user id. You do not need to enter a password.   Yadda, yadda. (FIXME:)</p>
13 <?php } ?>
14
15 <form method="post" action="<?=BASE_URL?>" accept-charset="<?=CHARSET?>" name="login">
16
17 <table cellspacing="4">
18 <tr>
19   <td align="right">UserId:</td>
20   <td><input type="text" name="auth[userid]" size="12" value="<?=$userid?>" /></td>
21 </tr>
22 <tr>
23   <td align="right">Password:</td>
24   <td><input type="password" name="auth[password]" size="12" /></td>
25 </tr>
26 <tr><td align="center" colspan="2">
27   <?=$Theme->makeButton(_("Sign In"), "submit:", "wikiaction")?>
28   <?php if (!$require_level) { ?>
29     <?=$Theme->makeButton(_("Cancel"), "submit:auth[cancel]", "wikiaction")?>
30   <?php } ?>
31 </td></tr>
32 </table>
33
34 <input type="hidden" name="auth[require_level]" value="<?=$require_level?>" />
35 <input type="hidden" name="auth[login]" value="1" />
36 <?php foreach ($query_args as $key => $val) { ?>
37   <input type="hidden" name="<?=$key?>" value="<?=$val?>" />
38 <?php } ?>
39 </form>
40
41 <script language="JavaScript" type="text/javascript">
42 <!-- // Really there's got to be a simpler way to do this....
43 function select_input (type) {
44     var elements = document.forms['login'].elements;
45     for (var i = 0; i < elements.length; i++) {
46         if (elements[i].type == type) {
47             elements[i].select();
48             return;
49         }
50     }
51 }
52 select_input('<?= $userid ? "password" : "text" ?>');
53 //-->
54 </script>
55