allow configuring the preferreddir

This commit is contained in:
Joey Hess 2013-04-26 13:00:14 -04:00
parent 867cba52a0
commit 8603109294
5 changed files with 81 additions and 50 deletions

View file

@ -39,6 +39,13 @@ passwordField = F.passwordField
|]
}
{- Useful in an AForm when sometimes a field is not used. -}
dummyField :: RenderMessage master FormMessage => Field sub master Text
dummyField = Field
{ fieldView = \_theId _name _attrs _val _isReq -> return ()
, fieldParse = const $ return $ Right Nothing
}
{- Makes a note widget be displayed after a field. -}
withNote :: Field sub master v -> GWidget sub master () -> Field sub master v
withNote field note = field { fieldView = newview }