web: use today as default when adding with a blank date

This commit is contained in:
Simon Michael 2009-12-12 22:21:51 +00:00
parent 4acc2c55ea
commit 736897998f

View File

@ -292,7 +292,7 @@ handleAddform l = do
validate :: Hack.Env -> Day -> Failing Transaction
validate env today =
let inputs = Hack.Contrib.Request.inputs env
date = decodeString $ fromMaybe "" $ lookup "date" inputs
date = decodeString $ fromMaybe "today" $ lookup "date" inputs
desc = decodeString $ fromMaybe "" $ lookup "desc" inputs
acct1 = decodeString $ fromMaybe "" $ lookup "acct1" inputs
amt1 = decodeString $ fromMaybe "" $ lookup "amt1" inputs