yesod changes
This commit is contained in:
parent
46d8398d7a
commit
881ea26d83
@ -94,9 +94,7 @@ setCreds doRedirects creds = do
|
||||
then do
|
||||
case authRoute y of
|
||||
Nothing -> do
|
||||
rh <- defaultLayout $ addBody [$hamlet|
|
||||
%h1 Invalid login
|
||||
|]
|
||||
rh <- defaultLayout [$hamlet|%h1 Invalid login|]
|
||||
sendResponse rh
|
||||
Just ar -> do
|
||||
setMessage $ string "Invalid login"
|
||||
@ -115,7 +113,7 @@ getCheckR = do
|
||||
creds <- maybeAuthId
|
||||
defaultLayoutJson (do
|
||||
setTitle $ string "Authentication Status"
|
||||
addBody $ html creds) (json creds)
|
||||
addHtml $ html creds) (json creds)
|
||||
where
|
||||
html creds = [$hamlet|
|
||||
%h1 Authentication Status
|
||||
|
||||
@ -18,8 +18,7 @@ authDummy =
|
||||
setCreds True $ Creds "dummy" ident []
|
||||
dispatch _ _ = notFound
|
||||
url = PluginR "dummy" []
|
||||
login authToMaster = do
|
||||
addBody [$hamlet|
|
||||
login authToMaster = [$hamlet|
|
||||
%form!method=post!action=@authToMaster.url@
|
||||
Your new identifier is: $
|
||||
%input!type=text!name=ident
|
||||
|
||||
@ -76,8 +76,7 @@ authEmail =
|
||||
dispatch "POST" ["set-password"] = go postPasswordR
|
||||
dispatch _ _ = notFound
|
||||
|
||||
login' tm = do
|
||||
addBody [$hamlet|
|
||||
login' tm = [$hamlet|
|
||||
%form!method=post!action=@tm.login@
|
||||
%table
|
||||
%tr
|
||||
@ -99,7 +98,7 @@ getRegisterR = do
|
||||
toMaster <- getRouteToMaster
|
||||
defaultLayout $ do
|
||||
setTitle $ string "Register a new account"
|
||||
addBody [$hamlet|
|
||||
addHamlet [$hamlet|
|
||||
%p Enter your e-mail address below, and a confirmation e-mail will be sent to you.
|
||||
%form!method=post!action=@toMaster.register@
|
||||
%label!for=email E-mail
|
||||
@ -129,7 +128,7 @@ postRegisterR = do
|
||||
sendVerifyEmail email verKey verUrl
|
||||
defaultLayout $ do
|
||||
setTitle $ string "Confirmation e-mail sent"
|
||||
addBody [$hamlet|
|
||||
addWidget [$hamlet|
|
||||
%p A confirmation e-mail has been sent to $email$.
|
||||
|]
|
||||
|
||||
@ -151,7 +150,7 @@ getVerifyR lid key = do
|
||||
_ -> return ()
|
||||
defaultLayout $ do
|
||||
setTitle $ string "Invalid verification key"
|
||||
addBody [$hamlet|
|
||||
addHtml [$hamlet|
|
||||
%p I'm sorry, but that was an invalid verification key.
|
||||
|]
|
||||
|
||||
@ -191,7 +190,7 @@ getPasswordR = do
|
||||
redirect RedirectTemporary $ toMaster login
|
||||
defaultLayout $ do
|
||||
setTitle $ string "Set password"
|
||||
addBody [$hamlet|
|
||||
addHamlet [$hamlet|
|
||||
%h3 Set a new password
|
||||
%form!method=post!action=@toMaster.setpass@
|
||||
%table
|
||||
|
||||
@ -53,7 +53,7 @@ authFacebook cid secret perms =
|
||||
render <- liftHandler getUrlRender
|
||||
let fb = Facebook.Facebook cid secret $ render $ tm url
|
||||
let furl = Facebook.getForwardUrl fb $ perms
|
||||
addBody [$hamlet|
|
||||
addHtml [$hamlet|
|
||||
%p
|
||||
%a!href=$furl$ Login with Facebook
|
||||
|]
|
||||
|
||||
@ -20,12 +20,12 @@ authOpenId =
|
||||
name = "openid_identifier"
|
||||
login tm = do
|
||||
ident <- newIdent
|
||||
addStyle [$cassius|
|
||||
addCassius [$cassius|
|
||||
#$ident$
|
||||
background: #fff url(http://www.myopenid.com/static/openid-icon-small.gif) no-repeat scroll 0pt 50%;
|
||||
padding-left: 18px;
|
||||
|]
|
||||
addBody [$hamlet|
|
||||
addHamlet [$hamlet|
|
||||
%form!method=get!action=@tm.forwardUrl@
|
||||
%label!for=openid OpenID: $
|
||||
%input#$ident$!type=text!name=$name$!value="http://"
|
||||
|
||||
@ -17,7 +17,7 @@ authRpxnow app apiKey =
|
||||
where
|
||||
login tm = do
|
||||
let url = {- FIXME urlEncode $ -} tm $ PluginR "rpxnow" []
|
||||
addBody [$hamlet|
|
||||
addHamlet [$hamlet|
|
||||
%iframe!src="http://$app$.rpxnow.com/openid/embed?token_url=@url@"!scrolling=no!frameBorder=no!allowtransparency=true!style="width:400px;height:240px"
|
||||
|]
|
||||
dispatch _ [] = do
|
||||
|
||||
Loading…
Reference in New Issue
Block a user