Mercurial > openid
changeset 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 | 35d06874bec4 |
children | c0731afcb0c7 |
files | src/ur/openidUser.ur src/ur/openidUser.urs |
diffstat | 2 files changed, 11 insertions(+), 4 deletions(-) [+] |
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
--- a/src/ur/openidUser.urs Thu Feb 24 17:29:45 2011 -0500 +++ b/src/ur/openidUser.urs Mon Apr 18 01:20:39 2011 -0430 @@ -66,6 +66,10 @@ (* If set, this string is always accepted as a verified * identifier, which can be useful during development (say, * when you're off-network). *) + + val ctlDisplay : {User : {Status : xbody, Other : xbody}, + Guest : {Status : xbody, Other : xbody}} + (* These help formatting the user status controls *) end) : sig type user