reform-hamlet-0.0: Add support for using Hamlet with Reform

Safe HaskellNone

Text.Reform.Hamlet.Common

Synopsis

Documentation

inputText :: (FormError error, Monad m, ToMarkup text) => (input -> Either error text) -> text -> Form m input error (HtmlUrl url) () textSource

inputPassword :: (Monad m, FormError error, ToMarkup text) => (input -> Either error text) -> text -> Form m input error (HtmlUrl url) () textSource

inputSubmit :: (Monad m, FormError error, ToMarkup text) => (input -> Either error text) -> text -> Form m input error (HtmlUrl url) () (Maybe text)Source

inputReset :: (Monad m, FormError error, ToMarkup text) => text -> Form m input error (HtmlUrl url) () ()Source

inputHidden :: (Monad m, FormError error, ToMarkup text) => (input -> Either error text) -> text -> Form m input error (HtmlUrl url) () textSource

inputButton :: (Monad m, FormError error, ToMarkup text) => text -> Form m input error (HtmlUrl url) () ()Source

textareaSource

Arguments

:: (Monad m, FormError error, ToMarkup text) 
=> (input -> Either error text) 
-> Int

cols

-> Int

rows

-> text

initial text

-> Form m input error (HtmlUrl url) () text 

inputFile :: (Monad m, FormError error, FormInput input, ErrorInputType error ~ input) => Form m input error (HtmlUrl url) () (FileType input)Source

buttonSubmit :: (Monad m, FormError error, ToMarkup text, ToMarkup children) => (input -> Either error text) -> text -> children -> Form m input error (HtmlUrl url) () (Maybe text)Source

Create a <button type="submit"> element

buttonReset :: (Monad m, FormError error, ToMarkup children) => children -> Form m input error (HtmlUrl url) () ()Source

button :: (Monad m, FormError error, ToMarkup children) => children -> Form m input error (HtmlUrl url) () ()Source

label :: (Monad m, ToMarkup c) => c -> Form m input error (HtmlUrl url) () ()Source

inputCheckboxSource

Arguments

:: forall x error input m url . (Monad m, FormInput input, FormError error, ErrorInputType error ~ input) 
=> Bool

initially checked

-> Form m input error (HtmlUrl url) () Bool 

inputCheckboxesSource

Arguments

:: (Functor m, Monad m, FormError error, ErrorInputType error ~ input, FormInput input, ToMarkup lbl) 
=> [(a, lbl)]

value, label, initially checked

-> (a -> Bool)

function which indicates if a value should be checked initially

-> Form m input error (HtmlUrl url) () [a] 

inputRadioSource

Arguments

:: (Functor m, Monad m, FormError error, ErrorInputType error ~ input, FormInput input, ToMarkup lbl) 
=> [(a, lbl)]

value, label, initially checked

-> (a -> Bool)

isDefault

-> Form m input error (HtmlUrl url) () a 

selectSource

Arguments

:: (Functor m, Monad m, FormError error, ErrorInputType error ~ input, FormInput input, ToMarkup lbl) 
=> [(a, lbl)]

value, label

-> (a -> Bool)

isDefault, must match *exactly one* element in the list of choices

-> Form m input error (HtmlUrl url) () a 

selectMultipleSource

Arguments

:: (Functor m, Monad m, FormError error, ErrorInputType error ~ input, FormInput input, ToMarkup lbl) 
=> [(a, lbl)]

value, label, initially checked

-> (a -> Bool)

isSelected initially

-> Form m input error (HtmlUrl url) () [a] 

errorList :: (Monad m, ToMarkup error) => Form m input error (HtmlUrl url) () ()Source

childErrorList :: (Monad m, ToMarkup error) => Form m input error (HtmlUrl url) () ()Source

br :: Monad m => Form m input error (HtmlUrl url) () ()Source

fieldset :: (Monad m, Functor m, ToMarkup c) => Form m input error c proof a -> Form m input error (HtmlUrl url) proof aSource

ol :: (Monad m, Functor m, ToMarkup c) => Form m input error c proof a -> Form m input error (HtmlUrl url) proof aSource

ul :: (Monad m, Functor m, ToMarkup c) => Form m input error c proof a -> Form m input error (HtmlUrl url) proof aSource

li :: (Monad m, Functor m, ToMarkup c) => Form m input error c proof a -> Form m input error (HtmlUrl url) proof aSource

formSource

Arguments

:: ToMarkup action 
=> action

action url

-> [(Text, Text)]

hidden fields to add to form

-> HtmlUrl url

children

-> HtmlUrl url 

create <form action=action method="POST" enctype="multipart/form-data">