]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/default/templates/signin.tmpl
apply semantic change for SignedIn <=> isAuthenticated, re-enable EditingPolicy with...
[SourceForge/phpwiki.git] / themes / default / templates / signin.tmpl
1 <?php // -*-html-*-
2      rcs_id('$Id: signin.tmpl,v 1.25 2004-02-19 22:15:43 rurban Exp $');
3
4      if (empty($FORMNAME))
5          $FORMNAME = 'signin';
6      else
7          $NOFORM = true;
8 ?>
9 <?php if (empty($NOFORM)) { ?>
10   <form method="post" action="<?= $request->getPostURL() ?>" accept-charset="<?=CHARSET?>" name="<?=$FORMNAME?>">
11   <?= HiddenInputs($request->getArgs(), false, array('auth')) ?>
12 <?php } ?>
13 <?php // Check for status SignedIn but not Authenticated ?>
14 <?php if ($user->isAuthenticated()) {
15   $Sep = $Theme->getButtonSeparator();
16   $SignOutB = $Theme->makeButton(_("Sign Out"), "javascript:SignOut();", 'wikiaction');
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 if (defined('EDITING_POLICY') and EDITING_POLICY) { ?>
45       if (window.focus) {
46         window.open('<?= WikiUrl(EDITING_POLICY) ?>',<!-- url -->
47                     'PleaseReadThisFirst',<!-- window name -->
48                     'width=600,height=430,scrollbars=yes,resizable=yes,toolbar=yes');
49       }
50       <?php } ?>
51       form.submit();
52     }
53     //-->
54     document.write('&nbsp;<?=
55     _("Sign in as:")
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 } ?>