diff src/ur/openidUser.ur @ 25:c560ec5bf514

More flexibility in placement of login form and other similar stuff
author Adam Chlipala <adam@chlipala.net>
date Thu, 20 Jan 2011 12:23:44 -0500
parents e5df3d3554d3
children ee97bc0e08fa
line wrap: on
line diff
--- a/src/ur/openidUser.ur	Mon Jan 17 16:07:24 2011 -0500
+++ b/src/ur/openidUser.ur	Thu Jan 20 12:23:44 2011 -0500
@@ -261,11 +261,10 @@
             cur <- current;
             here <- currentUrl;
             case cur of
-                Some cur => return <xml>Logged in as {[cur]}. <a link={logout ()}>[Log out]</a></xml>
-              | None => return <xml>
-                <form><textbox{#User}/> <submit value="Log In" action={logon (show here)}/></form>
-                <a link={signup (show here)}>Sign up</a>
-              </xml>
+                Some cur => return {Status = <xml>Logged in as {[cur]}.</xml>,
+                                    Other = <xml><a link={logout ()}>Log out</a></xml>}
+              | None => return {Status = <xml><form><textbox{#User}/> <submit value="Log In" action={logon (show here)}/></form></xml>,
+                                Other = <xml><a link={signup (show here)}>Sign up</a></xml>}
         end
 
     task periodic 60 = fn () => dml (DELETE FROM session