From: Reini U. <ru...@us...> - 2004-05-16 17:38:11
|
Update of /cvsroot/phpwiki/phpwiki/themes/Wordpress/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15355/Wordpress/templates Modified Files: signin.tmpl Log Message: fix bug #950841 "Sign In:" button appears twice, more signin unification Index: signin.tmpl =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/themes/Wordpress/templates/signin.tmpl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -2 -b -p -d -r1.1 -r1.2 --- signin.tmpl 10 Apr 2004 08:02:22 -0000 1.1 +++ signin.tmpl 16 May 2004 17:38:02 -0000 1.2 @@ -1,21 +1,21 @@ -<?php // -*-html-*- - // MPickering: modified; this will be enclosed within an ul - rcs_id('$Id$'); - - $Sep = $Theme->getButtonSeparator(); - $SignOutB = $Theme->makeButton(_("Sign Out"), "javascript:SignOut();", 'wikiaction'); +<?php // -*-php-*- +// MPickering: modified; this will be enclosed within an ul +rcs_id('$Id$'); - if (empty($FORMNAME)) +if (empty($FORMNAME)) $FORMNAME = 'signin'; - else +else $NOFORM = true; ?> <?php if (empty($NOFORM)) { ?> <li> - <form method="post" action="<?= $request->getPostURL() ?>" accept-charset="<?=CHARSET?>" name="<?=$FORMNAME?>"> + <form method="post" action="<?=$request->getPostURL()?>" accept-charset="<?=CHARSET?>" name="<?=$FORMNAME?>"> <?= HiddenInputs($request->getArgs(), false, array('auth')) ?> <?php } ?> -<?php if ($user->isAuthenticated()) { ?> - +<?php +if ($user->isAuthenticated()) { + $Sep = $Theme->getButtonSeparator(); + $SignOutB = $Theme->makeButton(_("Sign Out"), "javascript:SignOut();", 'wikiaction'); +?> <span> <?= fmt("Authenticated as %s", WikiLink($user->getAuthenticatedId(), 'auto')) ?> @@ -24,5 +24,5 @@ <script language="JavaScript" type="text/javascript"><!-- document.write('<br /><input type="hidden" name="auth[logout]" value="0" />'); - function SignOut(form) { + function SignOut() { var form = document.forms["<?=$FORMNAME?>"]; form.elements["auth[logout]"].value = 1; @@ -39,5 +39,5 @@ 'size' => 12, 'maxlength' => 256, - 'onchange' => "SignIn(this.form);")); + 'onchange' => "SignIn(this.form,false);")); $SignInInput->addTooltip(_("Enter your UserId to sign in")); $userid = $user->getId(); @@ -49,15 +49,17 @@ 'onclick'=>'SignIn(document.forms["'.$FORMNAME.'"],"'.$userid.'");'), $userid))); - ?> <script type="text/javascript"> <!-- - function SignIn(form) { - <?php /* (comment out:) + function SignIn(form,userid) { + <?php if (defined('EDITING_POLICY') and $request->_dbi->isWikiPage(EDITING_POLICY)) { ?> if (window.focus) { - window.open('/EditingPolicy.html',<!-- url --> + window.open('<?= WikiUrl(EDITING_POLICY) ?>',<!-- url --> 'PleaseReadThisFirst',<!-- window name --> 'width=600,height=430,scrollbars=yes,resizable=yes,toolbar=yes'); } - */ ?> + <?php } ?> + if (userid) { + form.elements["auth[userid]"].value = userid; + } form.submit(); } @@ -66,10 +68,10 @@ <?= Button("submit:auth[login]", _("Sign in as:"), 'wikiaction')?> <?= $SignInInput ?> +<?php /* // sf.net bug #950841 "Sign In:" button appears twice <noscript> - <?= Button("submit:auth[login]", _("Sign In"), 'wikiaction')?> + <?= Button("submit:auth[login]", _("Sign in as:"), 'wikiaction')?> </noscript> - +*/ ?> <?php } ?> - <?php if (empty($NOFORM)) { ?> </form> |