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