2 // MPickering: modified; this will be enclosed within an ul
9 <?php if (empty($NOFORM)) { ?>
11 <form method="post" action="<?php echo $request->getPostURL()?>" accept-charset="UTF-8" name="<?php echo $FORMNAME?>">
12 <?php echo HiddenInputs($request->getArgs(), false, array('auth')) ?>
15 if ($user->isAuthenticated()) {
16 $SignOutB = $WikiTheme->makeButton(_("Sign Out"), "javascript:SignOut();", 'wikiaction');
19 <?php echo fmt("Authenticated as %s", WikiLink($user->getAuthenticatedId(), 'auto')) ?>
22 <script type="text/javascript"><!--
23 document.write('<br /><input type="hidden" name="auth[logout]" value="0" />');
25 var form = document.forms["<?php echo $FORMNAME?>"];
26 form.elements["auth[logout]"].value = 1;
29 document.write('<?php echo $SignOutB?>'); // -->
32 <?php echo Button("submit:auth[logout]", _("Sign Out"), 'wikiaction') ?>
35 $SignInInput = HTML::input(array('type' => 'text',
36 'name' => "auth[userid]",
39 'onchange' => "SignIn(this.form,false);"));
40 $SignInInput->addTooltip(_("Enter your UserId to sign in"));
41 $userid = $user->getId();
42 if ($user->isSignedIn())
43 echo sprintf(_("You are signed but not authenticated as %s. "),
46 'title' => sprintf(_("Click to authenticate as %s"),$userid),
47 'onclick'=>'SignIn(document.forms["'.$FORMNAME.'"],"'.$userid.'");'),
50 <script type="text/javascript"> <!--
51 function SignIn(form,userid) {
52 <?php if (defined('EDITING_POLICY') and $request->_dbi->isWikiPage(EDITING_POLICY)) { ?>
54 window.open('<?php echo WikiUrl(EDITING_POLICY) ?>',<!-- url -->
55 'PleaseReadThisFirst',<!-- window name -->
56 'width=600,height=430,scrollbars=yes,resizable=yes,toolbar=yes');
60 form.elements["auth[userid]"].value = userid;
66 <?php echo Button("submit:auth[login]", _("Sign in as:"), 'wikiaction')?>
67 <?php echo $SignInInput ?>
68 <?php /* // sf.net bug #950841 "Sign In:" button appears twice
70 <?php echo Button("submit:auth[login]", _("Sign in as:"), 'wikiaction')?>
74 <?php if (empty($NOFORM)) { ?>