]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/default/templates/login.tmpl
fixed login, theme selection, UserPreferences.
[SourceForge/phpwiki.git] / themes / default / templates / login.tmpl
1 <?php // -*-html-*- ?>
2 <!-- $Id: login.tmpl,v 1.16 2002-08-23 18:29:34 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 (! $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 <?= HiddenGets(array('auth')) ?>
47 </form>
48
49 <script language="JavaScript" type="text/javascript">
50 <!-- // Really there's got to be a simpler way to do this....
51 function select_input (type) {
52     var elements = document.forms['login'].elements;
53     for (var i = 0; i < elements.length; i++) {
54         if (elements[i].type == type) {
55             elements[i].focus();
56             return;
57         }
58     }
59 }
60 select_input('<?= $userid ? "password" : "text" ?>');
61 //-->
62 </script>