From 55e477110478c6c3f055684c82871882a1cf1d29 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Sat, 24 Jul 2010 22:34:08 +0300 Subject: [PATCH] Fixed bug in boolInput --- Yesod/Form.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Yesod/Form.hs b/Yesod/Form.hs index fcb32fae..5ce22c39 100644 --- a/Yesod/Form.hs +++ b/Yesod/Form.hs @@ -742,7 +742,7 @@ maybeStringInput n = boolInput :: String -> FormInput sub master Bool boolInput n = GForm $ \env _ -> return - (FormSuccess $ isJust $ lookup n env, return $ addBody [$hamlet| + (FormSuccess $ fromMaybe "" (lookup n env) /= "", return $ addBody [$hamlet| %input#$n$!type=checkbox!name=$n$ |], UrlEncoded)