-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Form handling support for Yesod Web Framework
--   
--   Form handling support for Yesod Web Framework
@package yesod-form
@version 1.3.15

module Yesod.Form.Types

-- | The encoding type required by a form. The <tt>ToHtml</tt> instance
--   produces values that can be inserted directly into HTML.
data Enctype
UrlEncoded :: Enctype
Multipart :: Enctype

-- | A form can produce three different results: there was no data
--   available, the data was invalid, or there was a successful parse.
--   
--   The <a>Applicative</a> instance will concatenate the failure messages
--   in two <a>FormResult</a>s.
data FormResult a
FormMissing :: FormResult a
FormFailure :: [Text] -> FormResult a
FormSuccess :: a -> FormResult a
data FormMessage
MsgInvalidInteger :: Text -> FormMessage
MsgInvalidNumber :: Text -> FormMessage
MsgInvalidEntry :: Text -> FormMessage
MsgInvalidUrl :: Text -> FormMessage
MsgInvalidEmail :: Text -> FormMessage
MsgInvalidTimeFormat :: FormMessage
MsgInvalidHour :: Text -> FormMessage
MsgInvalidMinute :: Text -> FormMessage
MsgInvalidSecond :: Text -> FormMessage
MsgInvalidDay :: FormMessage
MsgCsrfWarning :: FormMessage
MsgValueRequired :: FormMessage
MsgInputNotFound :: Text -> FormMessage
MsgSelectNone :: FormMessage
MsgInvalidBool :: Text -> FormMessage
MsgBoolYes :: FormMessage
MsgBoolNo :: FormMessage
MsgDelete :: FormMessage
type Env = Map Text [Text]
type FileEnv = Map Text [FileInfo]
data Ints
IntCons :: Int -> Ints -> Ints
IntSingle :: Int -> Ints
type MForm m a = RWST (Maybe (Env, FileEnv), HandlerSite m, [Lang]) Enctype Ints m a
newtype AForm m a
AForm :: ((HandlerSite m, [Text]) -> Maybe (Env, FileEnv) -> Ints -> m (FormResult a, [FieldView (HandlerSite m)] -> [FieldView (HandlerSite m)], Ints, Enctype)) -> AForm m a
unAForm :: AForm m a -> (HandlerSite m, [Text]) -> Maybe (Env, FileEnv) -> Ints -> m (FormResult a, [FieldView (HandlerSite m)] -> [FieldView (HandlerSite m)], Ints, Enctype)
data Field m a
Field :: ([Text] -> [FileInfo] -> m (Either (SomeMessage (HandlerSite m)) (Maybe a))) -> FieldViewFunc m a -> Enctype -> Field m a
fieldParse :: Field m a -> [Text] -> [FileInfo] -> m (Either (SomeMessage (HandlerSite m)) (Maybe a))
fieldView :: Field m a -> FieldViewFunc m a
fieldEnctype :: Field m a -> Enctype
data FieldSettings master
FieldSettings :: SomeMessage master -> Maybe (SomeMessage master) -> Maybe Text -> Maybe Text -> [(Text, Text)] -> FieldSettings master
fsLabel :: FieldSettings master -> SomeMessage master
fsTooltip :: FieldSettings master -> Maybe (SomeMessage master)
fsId :: FieldSettings master -> Maybe Text
fsName :: FieldSettings master -> Maybe Text
fsAttrs :: FieldSettings master -> [(Text, Text)]
data FieldView site
FieldView :: Markup -> Maybe Markup -> Text -> WidgetT site IO () -> Maybe Markup -> Bool -> FieldView site
fvLabel :: FieldView site -> Markup
fvTooltip :: FieldView site -> Maybe Markup
fvId :: FieldView site -> Text
fvInput :: FieldView site -> WidgetT site IO ()
fvErrors :: FieldView site -> Maybe Markup
fvRequired :: FieldView site -> Bool
type FieldViewFunc m a = Text -> Text -> [(Text, Text)] -> Either Text a -> Bool -> WidgetT (HandlerSite m) IO ()
instance Show a => Show (FormResult a)
instance Eq Enctype
instance Enum Enctype
instance Bounded Enctype
instance Show FormMessage
instance Eq FormMessage
instance Read FormMessage
instance IsString (FieldSettings a)
instance MonadTrans AForm
instance (Monad m, Monoid a) => Monoid (AForm m a)
instance Monad m => Applicative (AForm m)
instance Monad m => Functor (AForm m)
instance Show Ints
instance Monoid Enctype
instance ToMarkup Enctype
instance Monoid m => Monoid (FormResult m)
instance Applicative FormResult
instance Functor FormResult

module Yesod.Form.Functions

-- | Get a unique identifier.
newFormIdent :: Monad m => MForm m Text
askParams :: Monad m => MForm m (Maybe Env)
askFiles :: Monad m => MForm m (Maybe FileEnv)
formToAForm :: (HandlerSite m ~ site, Monad m) => MForm m (FormResult a, [FieldView site]) -> AForm m a
aFormToForm :: (Monad m, HandlerSite m ~ site) => AForm m a -> MForm m (FormResult a, [FieldView site] -> [FieldView site])

-- | Converts a form field into monadic form. This field requires a value
--   and will return <a>FormFailure</a> if left empty.
mreq :: (RenderMessage site FormMessage, HandlerSite m ~ site, MonadHandler m) => Field m a -> FieldSettings site -> Maybe a -> MForm m (FormResult a, FieldView site)

-- | Converts a form field into monadic form. This field is optional, i.e.
--   if filled in, it returns 'Just a', if left empty, it returns
--   <a>Nothing</a>. Arguments are the same as for <a>mreq</a> (apart from
--   type of default value).
mopt :: (site ~ HandlerSite m, MonadHandler m) => Field m a -> FieldSettings site -> Maybe (Maybe a) -> MForm m (FormResult (Maybe a), FieldView site)

-- | Applicative equivalent of <a>mreq</a>.
areq :: (RenderMessage site FormMessage, HandlerSite m ~ site, MonadHandler m) => Field m a -> FieldSettings site -> Maybe a -> AForm m a

-- | Applicative equivalent of <a>mopt</a>.
aopt :: MonadHandler m => Field m a -> FieldSettings (HandlerSite m) -> Maybe (Maybe a) -> AForm m (Maybe a)

-- | This function is used to both initially render a form and to later
--   extract results from it. Note that, due to CSRF protection and a few
--   other issues, forms submitted via GET and POST are slightly different.
--   As such, be sure to call the relevant function based on how the form
--   will be submitted, <i>not</i> the current request method.
--   
--   For example, a common case is displaying a form on a GET request and
--   having the form submit to a POST page. In such a case, both the GET
--   and POST handlers should use <a>runFormPost</a>.
runFormPost :: (RenderMessage (HandlerSite m) FormMessage, MonadResource m, MonadHandler m) => (Markup -> MForm m (FormResult a, xml)) -> m ((FormResult a, xml), Enctype)
runFormPostNoToken :: MonadHandler m => (Markup -> MForm m (FormResult a, xml)) -> m ((FormResult a, xml), Enctype)
runFormGet :: MonadHandler m => (Markup -> MForm m a) -> m (a, Enctype)

-- | Similar to <a>runFormPost</a>, except it always ignores the currently
--   available environment. This is necessary in cases like a wizard UI,
--   where a single page will both receive and incoming form and produce a
--   new, blank form. For general usage, you can stick with
--   <tt>runFormPost</tt>.
generateFormPost :: (RenderMessage (HandlerSite m) FormMessage, MonadHandler m) => (Markup -> MForm m (FormResult a, xml)) -> m (xml, Enctype)

-- | Since 1.3.11
generateFormGet' :: (RenderMessage (HandlerSite m) FormMessage, MonadHandler m) => (Markup -> MForm m (FormResult a, xml)) -> m (xml, Enctype)

-- | <i>Deprecated: Will require RenderMessage in next verison of Yesod
--   </i>
generateFormGet :: MonadHandler m => (Markup -> MForm m a) -> m (a, Enctype)

-- | Creates a hidden field on the form that identifies it. This
--   identification is then used to distinguish between <i>missing</i> and
--   <i>wrong</i> form data when a single handler contains more than one
--   form.
--   
--   For instance, if you have the following code on your handler:
--   
--   <pre>
--   ((fooRes, fooWidget), fooEnctype) &lt;- runFormPost fooForm
--   ((barRes, barWidget), barEnctype) &lt;- runFormPost barForm
--   </pre>
--   
--   Then replace it with
--   
--   <pre>
--   ((fooRes, fooWidget), fooEnctype) &lt;- runFormPost $ identifyForm "foo" fooForm
--   ((barRes, barWidget), barEnctype) &lt;- runFormPost $ identifyForm "bar" barForm
--   </pre>
--   
--   Note that it's your responsibility to ensure that the identification
--   strings are unique (using the same one twice on a single handler will
--   not generate any errors). This allows you to create a variable number
--   of forms and still have them work even if their number or order change
--   between the HTML generation and the form submission.
identifyForm :: Monad m => Text -> (Markup -> MForm m (FormResult a, WidgetT (HandlerSite m) IO ())) -> (Markup -> MForm m (FormResult a, WidgetT (HandlerSite m) IO ()))
type FormRender m a = AForm m a -> Markup -> MForm m (FormResult a, WidgetT (HandlerSite m) IO ())

-- | Render a form into a series of tr tags. Note that, in order to allow
--   you to add extra rows to the table, this function does <i>not</i> wrap
--   up the resulting HTML in a table tag; you must do that yourself.
renderTable :: Monad m => FormRender m a

-- | render a field inside a div
renderDivs :: Monad m => FormRender m a

-- | render a field inside a div, not displaying any label
renderDivsNoLabels :: Monad m => FormRender m a

-- | Deprecated synonym for <a>renderBootstrap2</a>.

-- | <i>Deprecated: Please use the Yesod.Form.Bootstrap3 module. </i>
renderBootstrap :: Monad m => FormRender m a

-- | Render a form using Bootstrap v2-friendly shamlet syntax. If you're
--   using Bootstrap v3, then you should use the functions from module
--   <a>Yesod.Form.Bootstrap3</a>.
--   
--   Sample Hamlet:
--   
--   <pre>
--   &lt;form .form-horizontal method=post action=@{ActionR} enctype=#{formEnctype}&gt;
--     &lt;fieldset&gt;
--       &lt;legend&gt;_{MsgLegend}
--       $case result
--         $of FormFailure reasons
--           $forall reason &lt;- reasons
--             &lt;div .alert .alert-error&gt;#{reason}
--         $of _
--       ^{formWidget}
--       &lt;div .form-actions&gt;
--         &lt;input .btn .primary type=submit value=_{MsgSubmit}&gt;
--   </pre>
--   
--   Since 1.3.14
renderBootstrap2 :: Monad m => FormRender m a
check :: (Monad m, RenderMessage (HandlerSite m) msg) => (a -> Either msg a) -> Field m a -> Field m a

-- | Return the given error message if the predicate is false.
checkBool :: (Monad m, RenderMessage (HandlerSite m) msg) => (a -> Bool) -> msg -> Field m a -> Field m a
checkM :: (Monad m, RenderMessage (HandlerSite m) msg) => (a -> m (Either msg a)) -> Field m a -> Field m a

-- | Same as <a>checkM</a>, but modifies the datatype.
--   
--   In order to make this work, you must provide a function to convert
--   back from the new datatype to the old one (the second argument to this
--   function).
--   
--   Since 1.1.2
checkMMap :: (Monad m, RenderMessage (HandlerSite m) msg) => (a -> m (Either msg b)) -> (b -> a) -> Field m a -> Field m b

-- | Allows you to overwrite the error message on parse error.
customErrorMessage :: Monad m => SomeMessage (HandlerSite m) -> Field m a -> Field m a

-- | Generate a <a>FieldSettings</a> from the given label.
fieldSettingsLabel :: RenderMessage site msg => msg -> FieldSettings site

-- | A helper function for creating custom fields.
--   
--   This is intended to help with the common case where a single input
--   value is required, such as when parsing a text field.
--   
--   Since 1.1
parseHelper :: (Monad m, RenderMessage site FormMessage) => (Text -> Either FormMessage a) -> [Text] -> [FileInfo] -> m (Either (SomeMessage site) (Maybe a))

-- | A generalized version of <a>parseHelper</a>, allowing any type for the
--   message indicating a bad parse.
--   
--   Since 1.3.6
parseHelperGen :: (Monad m, RenderMessage site msg) => (Text -> Either msg a) -> [Text] -> [FileInfo] -> m (Either (SomeMessage site) (Maybe a))

module Yesod.Form.Input
newtype FormInput m a
FormInput :: (HandlerSite m -> [Text] -> Env -> FileEnv -> m (Either DText a)) -> FormInput m a
unFormInput :: FormInput m a -> HandlerSite m -> [Text] -> Env -> FileEnv -> m (Either DText a)
runInputGet :: MonadHandler m => FormInput m a -> m a
runInputPost :: MonadHandler m => FormInput m a -> m a
runInputPostResult :: MonadHandler m => FormInput m a -> m (FormResult a)
ireq :: (Monad m, RenderMessage (HandlerSite m) FormMessage) => Field m a -> Text -> FormInput m a
iopt :: Monad m => Field m a -> Text -> FormInput m (Maybe a)
instance Monad m => Applicative (FormInput m)
instance Monad m => Functor (FormInput m)


-- | Helper functions for creating forms when using Bootstrap v3.
module Yesod.Form.Bootstrap3

-- | Render the given form using Bootstrap v3 conventions.
--   
--   Sample Hamlet for <a>BootstrapHorizontalForm</a>:
--   
--   <pre>
--   &lt;form .form-horizontal role=form method=post action=@{ActionR} enctype=#{formEnctype}&gt;
--     ^{formWidget}
--     ^{bootstrapSubmit MsgSubmit}
--   </pre>
--   
--   Since: yesod-form 1.3.8
renderBootstrap3 :: Monad m => BootstrapFormLayout -> FormRender m a

-- | The layout used for the bootstrap form.
--   
--   Since: yesod-form 1.3.8
data BootstrapFormLayout
BootstrapBasicForm :: BootstrapFormLayout
BootstrapInlineForm :: BootstrapFormLayout
BootstrapHorizontalForm :: !BootstrapGridOptions -> !BootstrapGridOptions -> !BootstrapGridOptions -> !BootstrapGridOptions -> BootstrapFormLayout
bflLabelOffset :: BootstrapFormLayout -> !BootstrapGridOptions
bflLabelSize :: BootstrapFormLayout -> !BootstrapGridOptions
bflInputOffset :: BootstrapFormLayout -> !BootstrapGridOptions
bflInputSize :: BootstrapFormLayout -> !BootstrapGridOptions

-- | How many bootstrap grid columns should be taken (see
--   <a>BootstrapFormLayout</a>).
--   
--   Since: yesod-form 1.3.8
data BootstrapGridOptions
ColXs :: !Int -> BootstrapGridOptions
ColSm :: !Int -> BootstrapGridOptions
ColMd :: !Int -> BootstrapGridOptions
ColLg :: !Int -> BootstrapGridOptions

-- | Create a new <a>FieldSettings</a> with the classes that are required
--   by Bootstrap v3.
--   
--   Since: yesod-form 1.3.8
bfs :: RenderMessage site msg => msg -> FieldSettings site

-- | Add a placeholder attribute to a field. If you need i18n for the
--   placeholder, currently you'll need to do a hack and use
--   <a>getMessageRender</a> manually.
--   
--   Since: yesod-form 1.3.8
withPlaceholder :: Text -> FieldSettings site -> FieldSettings site

-- | Add an autofocus attribute to a field.
--   
--   Since: yesod-form 1.3.8
withAutofocus :: FieldSettings site -> FieldSettings site

-- | Add the <tt>input-lg</tt> CSS class to a field.
--   
--   Since: yesod-form 1.3.8
withLargeInput :: FieldSettings site -> FieldSettings site

-- | Add the <tt>input-sm</tt> CSS class to a field.
--   
--   Since: yesod-form 1.3.8
withSmallInput :: FieldSettings site -> FieldSettings site

-- | A Bootstrap v3 submit button disguised as a field for convenience. For
--   example, if your form currently is:
--   
--   <pre>
--   Person &lt;$&gt; areq textField "Name"    Nothing
--          &lt;*&gt; areq textField "Surname" Nothing
--   </pre>
--   
--   Then just change it to:
--   
--   <pre>
--   Person &lt;$&gt; areq textField "Name"    Nothing
--          &lt;*&gt; areq textField "Surname" Nothing
--          &lt;*  bootstrapSubmit "Register"
--   </pre>
--   
--   (Note that <tt>&lt;*</tt> is not a typo.)
--   
--   Alternatively, you may also just create the submit button manually as
--   well in order to have more control over its layout.
--   
--   Since: yesod-form 1.3.8
bootstrapSubmit :: (RenderMessage site msg, HandlerSite m ~ site, MonadHandler m) => BootstrapSubmit msg -> AForm m ()

-- | Same as <a>bootstrapSubmit</a> but for monadic forms. This isn't as
--   useful since you're not going to use <a>renderBootstrap3</a> anyway.
--   
--   Since: yesod-form 1.3.8
mbootstrapSubmit :: (RenderMessage site msg, HandlerSite m ~ site, MonadHandler m) => BootstrapSubmit msg -> MForm m (FormResult (), FieldView site)

-- | How the <a>bootstrapSubmit</a> button should be rendered.
--   
--   Since: yesod-form 1.3.8
data BootstrapSubmit msg
BootstrapSubmit :: msg -> Text -> [(Text, Text)] -> BootstrapSubmit msg

-- | The text of the submit button.
bsValue :: BootstrapSubmit msg -> msg

-- | Classes added to the <tt><a>button</a></tt>.
bsClasses :: BootstrapSubmit msg -> Text

-- | Attributes added to the <tt><a>button</a></tt>.
bsAttrs :: BootstrapSubmit msg -> [(Text, Text)]
instance Eq BootstrapGridOptions
instance Ord BootstrapGridOptions
instance Show BootstrapGridOptions
instance Show BootstrapFormLayout
instance Show msg => Show (BootstrapSubmit msg)
instance IsString msg => IsString (BootstrapSubmit msg)

module Yesod.Form.I18n.English
englishFormMessage :: FormMessage -> Text

module Yesod.Form.Fields
data FormMessage
MsgInvalidInteger :: Text -> FormMessage
MsgInvalidNumber :: Text -> FormMessage
MsgInvalidEntry :: Text -> FormMessage
MsgInvalidUrl :: Text -> FormMessage
MsgInvalidEmail :: Text -> FormMessage
MsgInvalidTimeFormat :: FormMessage
MsgInvalidHour :: Text -> FormMessage
MsgInvalidMinute :: Text -> FormMessage
MsgInvalidSecond :: Text -> FormMessage
MsgInvalidDay :: FormMessage
MsgCsrfWarning :: FormMessage
MsgValueRequired :: FormMessage
MsgInputNotFound :: Text -> FormMessage
MsgSelectNone :: FormMessage
MsgInvalidBool :: Text -> FormMessage
MsgBoolYes :: FormMessage
MsgBoolNo :: FormMessage
MsgDelete :: FormMessage
defaultFormMessage :: FormMessage -> Text
textField :: Monad m => RenderMessage (HandlerSite m) FormMessage => Field m Text
passwordField :: Monad m => RenderMessage (HandlerSite m) FormMessage => Field m Text
textareaField :: Monad m => RenderMessage (HandlerSite m) FormMessage => Field m Textarea
hiddenField :: (Monad m, PathPiece p, RenderMessage (HandlerSite m) FormMessage) => Field m p
intField :: (Monad m, Integral i, RenderMessage (HandlerSite m) FormMessage) => Field m i
dayField :: Monad m => RenderMessage (HandlerSite m) FormMessage => Field m Day
timeField :: Monad m => RenderMessage (HandlerSite m) FormMessage => Field m TimeOfDay
htmlField :: Monad m => RenderMessage (HandlerSite m) FormMessage => Field m Html
emailField :: Monad m => RenderMessage (HandlerSite m) FormMessage => Field m Text

-- | Since 1.3.7
multiEmailField :: Monad m => RenderMessage (HandlerSite m) FormMessage => Field m [Text]
searchField :: Monad m => RenderMessage (HandlerSite m) FormMessage => AutoFocus -> Field m Text
type AutoFocus = Bool
urlField :: Monad m => RenderMessage (HandlerSite m) FormMessage => Field m Text
doubleField :: Monad m => RenderMessage (HandlerSite m) FormMessage => Field m Double
parseDate :: String -> Either FormMessage Day
parseTime :: Text -> Either FormMessage TimeOfDay

-- | A newtype wrapper around a <a>Text</a> that converts newlines to HTML
--   br-tags.
newtype Textarea
Textarea :: Text -> Textarea
unTextarea :: Textarea -> Text
boolField :: Monad m => RenderMessage (HandlerSite m) FormMessage => Field m Bool

-- | While the default <tt><a>boolField</a></tt> implements a radio button
--   so you can differentiate between an empty response (Nothing) and a no
--   response (Just False), this simpler checkbox field returns an empty
--   response as Just False.
--   
--   Note that this makes the field always optional.
checkBoxField :: Monad m => RenderMessage (HandlerSite m) FormMessage => Field m Bool
fileField :: (Monad m, RenderMessage (HandlerSite m) FormMessage) => Field m FileInfo
fileAFormReq :: (MonadHandler m, RenderMessage (HandlerSite m) FormMessage) => FieldSettings (HandlerSite m) -> AForm m FileInfo
fileAFormOpt :: MonadHandler m => RenderMessage (HandlerSite m) FormMessage => FieldSettings (HandlerSite m) -> AForm m (Maybe FileInfo)
selectField :: (Eq a, RenderMessage site FormMessage) => HandlerT site IO (OptionList a) -> Field (HandlerT site IO) a
selectFieldList :: (Eq a, RenderMessage site FormMessage, RenderMessage site msg) => [(msg, a)] -> Field (HandlerT site IO) a
radioField :: (Eq a, RenderMessage site FormMessage) => HandlerT site IO (OptionList a) -> Field (HandlerT site IO) a
radioFieldList :: (Eq a, RenderMessage site FormMessage, RenderMessage site msg) => [(msg, a)] -> Field (HandlerT site IO) a
checkboxesFieldList :: (Eq a, RenderMessage site FormMessage, RenderMessage site msg) => [(msg, a)] -> Field (HandlerT site IO) [a]
checkboxesField :: (Eq a, RenderMessage site FormMessage) => HandlerT site IO (OptionList a) -> Field (HandlerT site IO) [a]
multiSelectField :: (Eq a, RenderMessage site FormMessage) => HandlerT site IO (OptionList a) -> Field (HandlerT site IO) [a]
multiSelectFieldList :: (Eq a, RenderMessage site FormMessage, RenderMessage site msg) => [(msg, a)] -> Field (HandlerT site IO) [a]
data Option a
Option :: Text -> a -> Text -> Option a
optionDisplay :: Option a -> Text
optionInternalValue :: Option a -> a
optionExternalValue :: Option a -> Text
data OptionList a
OptionList :: [Option a] -> (Text -> Maybe a) -> OptionList a
olOptions :: OptionList a -> [Option a]
olReadExternal :: OptionList a -> Text -> Maybe a
mkOptionList :: [Option a] -> OptionList a
optionsPersist :: (YesodPersist site, PersistEntity a, PersistQuery (YesodPersistBackend site (HandlerT site IO)), PathPiece (Key a), PersistEntityBackend a ~ PersistMonadBackend (YesodPersistBackend site (HandlerT site IO)), RenderMessage site msg) => [Filter a] -> [SelectOpt a] -> (a -> msg) -> HandlerT site IO (OptionList (Entity a))

-- | An alternative to <a>optionsPersist</a> which returns just the
--   <tt>Key</tt> instead of the entire <tt>Entity</tt>.
--   
--   Since 1.3.2
optionsPersistKey :: (YesodPersist site, PersistEntity a, PersistQuery (YesodPersistBackend site (HandlerT site IO)), PathPiece (Key a), RenderMessage site msg, PersistEntityBackend a ~ PersistMonadBackend (YesodPersistBackend site (HandlerT site IO))) => [Filter a] -> [SelectOpt a] -> (a -> msg) -> HandlerT site IO (OptionList (Key a))
optionsPairs :: (MonadHandler m, RenderMessage (HandlerSite m) msg) => [(msg, a)] -> m (OptionList a)
optionsEnum :: (MonadHandler m, Show a, Enum a, Bounded a) => m (OptionList a)
instance Show Textarea
instance Read Textarea
instance Eq Textarea
instance PersistField Textarea
instance Ord Textarea
instance ToJSON Textarea
instance FromJSON Textarea
instance ToMarkup Textarea
instance PersistFieldSql Textarea

module Yesod.Form.MassInput
inputList :: (m ~ HandlerT site IO, xml ~ WidgetT site IO (), RenderMessage site FormMessage) => Html -> ([[FieldView site]] -> xml) -> (Maybe a -> AForm (HandlerT site IO) a) -> (Maybe [a] -> AForm (HandlerT site IO) [a])
massDivs :: [[FieldView site]] -> WidgetT site IO ()
massTable :: [[FieldView site]] -> WidgetT site IO ()

module Yesod.Form.I18n.Portuguese
portugueseFormMessage :: FormMessage -> Text

module Yesod.Form.I18n.Swedish
swedishFormMessage :: FormMessage -> Text

module Yesod.Form.I18n.German
germanFormMessage :: FormMessage -> Text

module Yesod.Form.I18n.French
frenchFormMessage :: FormMessage -> Text

module Yesod.Form.I18n.Norwegian
norwegianBokmålFormMessage :: FormMessage -> Text

module Yesod.Form.I18n.Japanese
japaneseFormMessage :: FormMessage -> Text

module Yesod.Form.I18n.Czech
czechFormMessage :: FormMessage -> Text

module Yesod.Form.I18n.Russian
russianFormMessage :: FormMessage -> Text


-- | Parse forms (and query strings).
module Yesod.Form


-- | Some fields spiced up with jQuery UI.
module Yesod.Form.Jquery
class YesodJquery a where urlJqueryJs _ = Right "//ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js" urlJqueryUiJs _ = Right "//ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js" urlJqueryUiCss _ = Right $ googleHostedJqueryUiCss "cupertino" urlJqueryUiDateTimePicker _ = Right "http://github.com/gregwebs/jquery.ui.datetimepicker/raw/master/jquery.ui.datetimepicker.js"
urlJqueryJs :: YesodJquery a => a -> Either (Route a) Text
urlJqueryUiJs :: YesodJquery a => a -> Either (Route a) Text
urlJqueryUiCss :: YesodJquery a => a -> Either (Route a) Text
urlJqueryUiDateTimePicker :: YesodJquery a => a -> Either (Route a) Text
jqueryDayField :: (RenderMessage site FormMessage, YesodJquery site) => JqueryDaySettings -> Field (HandlerT site IO) Day
jqueryAutocompleteField :: (RenderMessage site FormMessage, YesodJquery site) => Route site -> Field (HandlerT site IO) Text
jqueryAutocompleteField' :: (RenderMessage site FormMessage, YesodJquery site) => Int -> Route site -> Field (HandlerT site IO) Text

-- | Gets the Google hosted jQuery UI 1.8 CSS file with the given theme.
googleHostedJqueryUiCss :: Text -> Text
data JqueryDaySettings
JqueryDaySettings :: Bool -> Bool -> String -> Either Int (Int, Int) -> JqueryDaySettings
jdsChangeMonth :: JqueryDaySettings -> Bool
jdsChangeYear :: JqueryDaySettings -> Bool
jdsYearRange :: JqueryDaySettings -> String
jdsNumberOfMonths :: JqueryDaySettings -> Either Int (Int, Int)
class Default a
def :: Default a => a
instance Default JqueryDaySettings


-- | Provide the user with a rich text editor.
module Yesod.Form.Nic
class Yesod a => YesodNic a where urlNicEdit _ = Right "http://js.nicedit.com/nicEdit-latest.js"
urlNicEdit :: YesodNic a => a -> Either (Route a) Text
nicHtmlField :: YesodNic site => Field (HandlerT site IO) Html
