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