]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/default/templates/login.tmpl
Gettext adjustments for French punctuation
[SourceForge/phpwiki.git] / themes / default / templates / login.tmpl
1 <?php // -*-html-*- ?>
2 <!-- $Id: login.tmpl,v 1.20 2002-12-15 01:30:47 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 if (ALLOW_BOGO_LOGIN && $require_level <= WIKIAUTH_BOGO) {
11   // This iso-8859-1 sample covers French, Spanish, Italian, German, and probably others
12   $examplechars = htmlentities("ÀñíçéàÖãæôßøü", ENT_QUOTES, 'iso-8859-1');
13   // Japanese login doesn't work yet
14   /*if ((CHARSET == 'utf-8') && defined('ALLOW_NONWIKIWORD_LOGINS') && ALLOW_NONWIKIWORD_LOGINS) {
15     //sample Japanese loginname in unicode
16     $examplechars = $examplechars . "&#22825;&#36947;&#12354;&#12363;&#12397;";
17   }*/ ?>
18   <p><?= printf(_("You may sign in using any WikiWord as a UserId. (%s etc. may be used too). The UserId will be used as a link in RecentChanges to your UserId page, your HomePage."), $examplechars) ?>
19   <?php if (empty($pass_required)) ?>
20   <?= _("New users may use an empty password.") ?>
21   </p>
22 <?php } ?>
23
24 <form method="post" action="<?= $request->getURLtoSelf() ?>" accept-charset="<?=CHARSET?>" name="login">
25
26 <table cellspacing="4">
27 <tr>
28   <td align="right"><?= _("UserId:") ?></td>
29   <td><input type="text" name="auth[userid]" size="12" maxlength="256" value="<?=$userid?>" /></td>
30 </tr>
31 <tr>
32   <td align="right"><?= _("Password:") ?></td>
33   <td><input type="password" name="auth[passwd]" size="12" maxlength="256" /></td>
34 </tr>
35 <?php
36   $dbi = $request->getDbh();
37   $checked = (!empty($userid) and $dbi->isWikiPage($userid)) ? '' : 'checked="checked"';
38 ?>
39 <tr>
40   <td align="right"><?= _("Create Homepage:") ?></td>
41   <td><input type="checkbox" name="auth[homepage]" <?=$checked?> /></td>
42 </tr>
43 <tr><td align="center" colspan="2">
44   <?=Button("submit:", _("Sign In"), 'wikiaction')?>
45   <?php if (!$require_level) { ?>
46     <?=Button("submit:auth[cancel]", _("Cancel"), 'button')?>
47   <?php } ?>
48 </td></tr>
49 </table>
50
51 <input type="hidden" name="auth[require_level]" value="<?=$require_level?>" />
52 <input type="hidden" name="auth[login]" value="1" />
53 <?= HiddenPosts(array('auth')) ?>
54 <? //HiddenGets(array('auth')) ?>
55 </form>
56
57 <script language="JavaScript" type="text/javascript">
58 <!-- // Really there's got to be a simpler way to do this....
59 function select_input (type) {
60     var elements = document.forms['login'].elements;
61     for (var i = 0; i < elements.length; i++) {
62         if (elements[i].type == type) {
63             elements[i].focus();
64             return;
65         }
66     }
67 }
68 select_input('<?= $userid ? "password" : "text" ?>');
69 //-->
70 </script>