Haddock fixes
This commit is contained in:
parent
a598846bd3
commit
a35161cf6e
@ -202,7 +202,7 @@ $newline never
|
|||||||
FormFailure [renderMessage m langs MsgCsrfWarning]
|
FormFailure [renderMessage m langs MsgCsrfWarning]
|
||||||
_ -> res
|
_ -> res
|
||||||
where (Just [t1]) === (Just t2) = TE.encodeUtf8 t1 `constTimeEq` TE.encodeUtf8 t2
|
where (Just [t1]) === (Just t2) = TE.encodeUtf8 t1 `constTimeEq` TE.encodeUtf8 t2
|
||||||
Nothing === Nothing = True -- ^ It's important to use constTimeEq
|
Nothing === Nothing = True -- It's important to use constTimeEq
|
||||||
_ === _ = False -- in order to avoid timing attacks.
|
_ === _ = False -- in order to avoid timing attacks.
|
||||||
return ((res', xml), enctype)
|
return ((res', xml), enctype)
|
||||||
|
|
||||||
|
|||||||
@ -18,6 +18,7 @@ module Yesod.Form.Types
|
|||||||
, Field (..)
|
, Field (..)
|
||||||
, FieldSettings (..)
|
, FieldSettings (..)
|
||||||
, FieldView (..)
|
, FieldView (..)
|
||||||
|
, FieldViewFunc
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Control.Monad.Trans.RWS (RWST)
|
import Control.Monad.Trans.RWS (RWST)
|
||||||
@ -123,14 +124,17 @@ data FieldView sub master = FieldView
|
|||||||
, fvRequired :: Bool
|
, fvRequired :: Bool
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type FieldViewFunc sub master a
|
||||||
|
= Text -- ^ ID
|
||||||
|
-> Text -- ^ Name
|
||||||
|
-> [(Text, Text)] -- ^ Attributes
|
||||||
|
-> Either Text a -- ^ Either (invalid text) or (legitimate result)
|
||||||
|
-> Bool -- ^ Required?
|
||||||
|
-> GWidget sub master ()
|
||||||
|
|
||||||
data Field sub master a = Field
|
data Field sub master a = Field
|
||||||
{ fieldParse :: [Text] -> GHandler sub master (Either (SomeMessage master) (Maybe a))
|
{ fieldParse :: [Text] -> GHandler sub master (Either (SomeMessage master) (Maybe a))
|
||||||
, fieldView :: Text -- ^ ID
|
, fieldView :: FieldViewFunc sub master a
|
||||||
-> Text -- ^ Name
|
|
||||||
-> [(Text, Text)] -- ^ Attributes
|
|
||||||
-> Either Text a -- ^ Either (invalid text) or (legitimate result)
|
|
||||||
-> Bool -- ^ Required?
|
|
||||||
-> GWidget sub master ()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
data FormMessage = MsgInvalidInteger Text
|
data FormMessage = MsgInvalidInteger Text
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user