]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/default/templates/signin.tmpl
Moved _("Sign in:") to its own line. Otherwise for some reason
[SourceForge/phpwiki.git] / themes / default / templates / signin.tmpl
1 <?php // -*-html-*-
2      rcs_id('$Id: signin.tmpl,v 1.22 2003-11-09 20:58:15 carstenklapp Exp $');
3
4      $Sep = $Theme->getButtonSeparator();
5      $SignOutB = $Theme->makeButton(_("Sign Out"), "javascript:SignOut();", 'wikiaction');
6
7      if (empty($FORMNAME))
8          $FORMNAME = 'signin';
9      else
10          $NOFORM = true;
11 ?>
12 <?php if (empty($NOFORM)) { ?>
13   <form method="post" action="<?= $request->getPostURL() ?>" accept-charset="<?=CHARSET?>" name="<?=$FORMNAME?>">
14   <?= HiddenInputs($request->getArgs(), false, array('auth')) ?>
15 <?php } ?>
16 <?php if ($user->isSignedIn()) {  ?>
17
18 <span>
19   <?= fmt("You are signed in as %s", WikiLink($user->getId(), 'auto')) ?>
20   <?=$Sep?>
21 </span>
22   <script language="JavaScript" type="text/javascript"><!--
23     document.write('<input type="hidden" name="auth[logout]" value="0" />');
24     function SignOut(form) { 
25       var form = document.forms["<?=$FORMNAME?>"];
26       form.elements["auth[logout]"].value = 1;
27       form.submit();
28     }
29     document.write('<?=$SignOutB?>'); // -->
30   </script>
31   <noscript>
32     <?= Button("submit:auth[logout]", _("Sign Out"), 'wikiaction') ?>
33   </noscript>
34 <?php } else {
35   $SignInInput = HTML::input(array('type' => 'text',
36                                    'name' => "auth[userid]",
37                                    'size' => 12,
38                                    'maxlength' => 256,
39                                    'onchange' => "SignIn(this.form);"));
40   $SignInInput->addTooltip(_("Enter your UserId to sign in")) 
41 ?>
42   <script type="text/javascript"> <!--
43     function SignIn(form) {
44       <?php /* (comment out:)
45       if (window.focus) {
46         window.open('/EditingPolicy.html',<!-- url -->
47                     'PleaseReadThisFirst',<!-- window name -->
48                     'width=600,height=430,scrollbars=yes,resizable=yes,toolbar=yes');
49       }
50       */ ?>
51       form.submit();
52     }
53     //-->
54     document.write('&nbsp;<?=
55     _("Sign in:")
56     ?>');
57   </script>
58   <?= $SignInInput ?>
59   <noscript>
60     <?= Button("submit:auth[login]", _("Sign In"), 'wikiaction')?>
61   </noscript>
62
63 <?php } ?>
64
65 <?php if (empty($NOFORM)) { ?>
66   </form>
67 <?php } ?>