2 <!-- $Id: login.tmpl,v 1.1 2002-01-19 07:21:58 dairiki Exp $ -->
3 <!-- The login form -->
5 <?php if ($FAILURE_MESSAGE) { ?>
6 <h2><?=_("Signin Failed")?></h2>
7 <p><?=$FAILURE_MESSAGE?></p>
8 <hr noshade="noshade" />
12 <?php if (ALLOW_BOGO_LOGIN && $REQUIRE == WIKIAUTH_BOGO) { ?>
13 <p>Sign in required.</p>
14 <?php } elseif ($REQUIRE >= WIKIAUTH_ADMIN) { ?>
15 <p>Administrative privileges required.</p>
16 <?php } elseif ($REQUIRE > WIKIAUTH_ANON) { ?>
17 <p>Login required.</p>
20 <?php if (ALLOW_BOGO_LOGIN && $REQUIRE <= WIKIAUTH_BOGO) { ?>
21 <p>You may sign in using any WikiWord as a user id. You do not need to enter a password. Yadda, yadda. (FIXME:)</p>
24 <form method="post" action="<?=BASE_URL?>" accept-charset="<?=CHARSET?>" name="login">
26 <table cellspacing="4">
28 <td align="right">UserId:</td>
29 <td><input type="text" name="login[userid]" size="12" value="<?=$DEFAULT_USERID?>" /></td>
32 <td align="right">Password:</td>
33 <td><input type="password" name="login[password]" size="12" /></td>
35 <tr><td align="center" colspan="2">
36 <input type="submit" name="login[submit]" value=" <?=_("Sign In")?> " />
37 <?php if (!$REQUIRE) { ?>
38 <input type="submit" name="login[cancel]" value=" <?=_("Cancel")?> " />
43 <input type="hidden" name="login[require_level]" value="<?=$REQUIRE?>" />
44 <input type="hidden" name="login[login]" value="1" />
45 <?php foreach ($query_args as $key => $val) { ?>
46 <input type="hidden" name="<?=htmlspecialchars($key)?>" value="<?=htmlspecialchars($val)?>" />
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) {
61 select_input('<?= $DEFAULT_USERID ? "password" : "text" ?>');