]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/default/templates/login.tmpl
use focus() for form <input> elements, select() is for <option> elements (fix for...
[SourceForge/phpwiki.git] / themes / default / templates / login.tmpl
1 <?php // -*-html-*- ?>
2 <!-- $Id: login.tmpl,v 1.14 2002-02-14 19:08:14 carstenklapp 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 
11 if (ALLOW_BOGO_LOGIN && $require_level <= WIKIAUTH_BOGO) {
12   echo '<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. You do not need to enter a password."), '</p>';
13
14 ?>
15
16 <form method="post" action="<?=BASE_URL?>" accept-charset="<?=CHARSET?>" name="login">
17
18 <table cellspacing="4">
19 <tr>
20   <td align="right"><?= _("UserId") ?>:</td>
21   <td><input type="text" name="auth[userid]" size="12" maxlength="256" value="<?=$userid?>" /></td>
22 </tr>
23 <tr>
24   <td align="right"><?= _("Password") ?>:</td>
25   <td><input type="password" name="auth[password]" size="12" maxlength="256" /></td>
26 </tr>
27 <tr><td align="center" colspan="2">
28   <?=Button("submit:", _("Sign In"), 'wikiaction')?>
29   <?php if (!$require_level) { ?>
30     <?=Button("submit:auth[cancel]", _("Cancel"), 'button')?>
31   <?php } ?>
32 </td></tr>
33 </table>
34
35 <input type="hidden" name="auth[require_level]" value="<?=$require_level?>" />
36 <input type="hidden" name="auth[login]" value="1" />
37 <?= HiddenInputs($request->getArgs()) ?>
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].focus();
47             return;
48         }
49     }
50 }
51 select_input('<?= $userid ? "password" : "text" ?>');
52 //-->
53 </script>
54