Mercurial > openid
changeset 32:90b8ce9be9f5
Change some field names and update utest
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Thu, 21 Apr 2011 13:24:55 -0400 |
parents | 1be573ac8e2b |
children | df258dbf4739 |
files | src/ur/openidUser.ur src/ur/openidUser.urs tests/utest.ur |
diffstat | 3 files changed, 15 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ur/openidUser.ur Mon Apr 18 01:20:39 2011 -0430 +++ b/src/ur/openidUser.ur Thu Apr 21 13:24:55 2011 -0400 @@ -29,8 +29,8 @@ val formClass : css_class val fakeId : option string - val ctlDisplay : {User : {Status : xbody, Other : xbody}, - Guest : {Status : xbody, Other : xbody}} + val ctlDisplay : {User : {Status : xbody, Logout : xbody}, + Guest : {Status : xbody, Signup : xbody}} end) = struct type user = string @@ -300,9 +300,9 @@ here <- currentUrl; case cur of Some cur => return {Status = <xml>{M.ctlDisplay.User.Status}{[cur]}</xml>, - Other = <xml><a link={logout ()}>{M.ctlDisplay.User.Other}</a></xml>} + Other = <xml><a link={logout ()}>{M.ctlDisplay.User.Logout}</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>} + Other = <xml><a link={signup (show here)}>{M.ctlDisplay.Guest.Signup}</a></xml>} end task periodic 60 = fn () => dml (DELETE FROM session
--- a/src/ur/openidUser.urs Mon Apr 18 01:20:39 2011 -0430 +++ b/src/ur/openidUser.urs Thu Apr 21 13:24:55 2011 -0400 @@ -67,9 +67,14 @@ * 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 *) + val ctlDisplay : {User : {Status : xbody, + (* Anything extra to display to represent the logged-in user's status *) + Logout : xbody + (* Text for link to log out *)}, + Guest : {Status : xbody, + (* What to show in the place where a logged-in user's status would be *) + Signup : xbody + (* Text for link to sign up *)}} end) : sig type user
--- a/tests/utest.ur Mon Apr 18 01:20:39 2011 -0430 +++ b/tests/utest.ur Thu Apr 21 13:24:55 2011 -0400 @@ -29,6 +29,9 @@ val formClass = inputs val fakeId = None + + val ctlDisplay = {User = {Status = <xml>Status</xml>, Logout = <xml>Log Out</xml>}, + Guest = {Status = <xml>Status</xml>, Signup = <xml>Sign Up</xml>}} end) fun wrap title body =