Safe Haskell | None |
---|
- data Enctype
- = UrlEncoded
- | Multipart
- data FormResult a
- = FormMissing
- | FormFailure [Text]
- | FormSuccess a
- data FormMessage
- = MsgInvalidInteger Text
- | MsgInvalidNumber Text
- | MsgInvalidEntry Text
- | MsgInvalidUrl Text
- | MsgInvalidEmail Text
- | MsgInvalidTimeFormat
- | MsgInvalidHour Text
- | MsgInvalidMinute Text
- | MsgInvalidSecond Text
- | MsgInvalidDay
- | MsgCsrfWarning
- | MsgValueRequired
- | MsgInputNotFound Text
- | MsgSelectNone
- | MsgInvalidBool Text
- | MsgBoolYes
- | MsgBoolNo
- | MsgDelete
- type Env = Map Text [Text]
- type FileEnv = Map Text [FileInfo]
- data Ints
- type MForm sub master a = RWST (Maybe (Env, FileEnv), master, [Lang]) Enctype Ints (GHandler sub master) a
- newtype AForm sub master a = AForm {}
- data Field sub master a = Field {
- fieldParse :: [Text] -> [FileInfo] -> GHandler sub master (Either (SomeMessage master) (Maybe a))
- fieldView :: FieldViewFunc sub master a
- fieldEnctype :: Enctype
- data FieldSettings master = FieldSettings {}
- data FieldView sub master = FieldView {}
- type FieldViewFunc sub master a = Text -> Text -> [(Text, Text)] -> Either Text a -> Bool -> GWidget sub master ()
Helpers
The encoding type required by a form. The ToHtml
instance produces values
that can be inserted directly into HTML.
data FormResult a Source
A form can produce three different results: there was no data available, the data was invalid, or there was a successful parse.
The Applicative
instance will concatenate the failure messages in two
FormResult
s.
Functor FormResult | |
Applicative FormResult | |
Show a => Show (FormResult a) | |
Monoid m => Monoid (FormResult m) |
data FormMessage Source
Form
type MForm sub master a = RWST (Maybe (Env, FileEnv), master, [Lang]) Enctype Ints (GHandler sub master) aSource
Build forms
data Field sub master a Source
Field | |
|
data FieldSettings master Source