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