]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/default/templates/login.tmpl
LANG still broken, working on better locale handling.
[SourceForge/phpwiki.git] / themes / default / templates / login.tmpl
1 <?php // -*-html-*- ?>
2 <!-- $Id: login.tmpl,v 1.17 2002-08-27 21:51:31 rurban 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 UserId. (ÀÖØöøÿßö etc. may be used too). The UserId will be used as a link in RecentChanges to your UserId page, your HomePage.") ?>
12   <?php if (empty($pass_required)) ?>
13   <?= _("New users may use an empty password.") ?>
14   </p>
15 <?php } ?>
16
17 <form method="POST" action="<?= $request->getURLtoSelf() ?>" accept-charset="<?=CHARSET?>" name="login">
18
19 <table cellspacing="4">
20 <tr>
21   <td align="right"><?= _("UserId") ?>:</td>
22   <td><input type="text" name="auth[userid]" size="12" maxlength="256" value="<?=$userid?>" /></td>
23 </tr>
24 <tr>
25   <td align="right"><?= _("Password") ?>:</td>
26   <td><input type="password" name="auth[passwd]" size="12" maxlength="256" /></td>
27 </tr>
28 <?php
29   $dbi = $request->getDbh();
30   $checked = (!empty($userid) and $dbi->isWikiPage($userid)) ? '' : 'checked="checked"';
31 ?>
32 <tr>
33   <td align="right"><?= _("Create Homepage") ?>:</td>
34   <td><input type="checkbox" name="auth[homepage]" <?=$checked?> /></td>
35 </tr>
36 <tr><td align="center" colspan="2">
37   <?=Button("submit:", _("Sign In"), 'wikiaction')?>
38   <?php if (!$require_level) { ?>
39     <?=Button("submit:auth[cancel]", _("Cancel"), 'button')?>
40   <?php } ?>
41 </td></tr>
42 </table>
43
44 <input type="hidden" name="auth[require_level]" value="<?=$require_level?>" />
45 <input type="hidden" name="auth[login]" value="1" />
46 <?= HiddenPosts(array('auth')) ?>
47 <? //HiddenGets(array('auth')) ?>
48 </form>
49
50 <script language="JavaScript" type="text/javascript">
51 <!-- // Really there's got to be a simpler way to do this....
52 function select_input (type) {
53     var elements = document.forms['login'].elements;
54     for (var i = 0; i < elements.length; i++) {
55         if (elements[i].type == type) {
56             elements[i].focus();
57             return;
58         }
59     }
60 }
61 select_input('<?= $userid ? "password" : "text" ?>');
62 //-->
63 </script>