Mercurial > openid
diff src/ur/openidUser.ur @ 33:43f921ee8ee5
Add some formatting options to the user control xml.
author | Karn Kallio <kkallio@eka> |
---|---|
date | Mon, 18 Apr 2011 01:20:39 -0430 |
parents | fcd3a977d77b |
children | c0731afcb0c7 |
line wrap: on
line diff
--- a/src/ur/openidUser.ur Thu Feb 24 17:29:45 2011 -0500 +++ b/src/ur/openidUser.ur Mon Apr 18 01:20:39 2011 -0430 @@ -28,6 +28,9 @@ val realm : option string val formClass : css_class val fakeId : option string + + val ctlDisplay : {User : {Status : xbody, Other : xbody}, + Guest : {Status : xbody, Other : xbody}} end) = struct type user = string @@ -296,10 +299,10 @@ cur <- current; here <- currentUrl; case cur of - 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>} + Some cur => return {Status = <xml>{M.ctlDisplay.User.Status}{[cur]}</xml>, + Other = <xml><a link={logout ()}>{M.ctlDisplay.User.Other}</a></xml>} + | None => return {Status = <xml>{M.ctlDisplay.Guest.Status}<form><textbox{#User}/> <submit value="Log In" action={logon (show here)}/></form></xml>, + Other = <xml><a link={signup (show here)}>{M.ctlDisplay.Guest.Other}</a></xml>} end task periodic 60 = fn () => dml (DELETE FROM session