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

Safe Haskell | None

Text.Reform.Hamlet.Common

Synopsis

- inputText :: (FormError error, Monad m, ToMarkup text) => (input -> Either error text) -> text -> Form m input error (HtmlUrl url) () text
- inputPassword :: (Monad m, FormError error, ToMarkup text) => (input -> Either error text) -> text -> Form m input error (HtmlUrl url) () text
- inputSubmit :: (Monad m, FormError error, ToMarkup text) => (input -> Either error text) -> text -> Form m input error (HtmlUrl url) () (Maybe text)
- inputReset :: (Monad m, FormError error, ToMarkup text) => text -> Form m input error (HtmlUrl url) () ()
- inputHidden :: (Monad m, FormError error, ToMarkup text) => (input -> Either error text) -> text -> Form m input error (HtmlUrl url) () text
- inputButton :: (Monad m, FormError error, ToMarkup text) => text -> Form m input error (HtmlUrl url) () ()
- textarea :: (Monad m, FormError error, ToMarkup text) => (input -> Either error text) -> Int -> Int -> 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)
- buttonSubmit :: (Monad m, FormError error, ToMarkup text, ToMarkup children) => (input -> Either error text) -> text -> children -> Form m input error (HtmlUrl url) () (Maybe text)
- buttonReset :: (Monad m, FormError error, ToMarkup children) => children -> Form m input error (HtmlUrl url) () ()
- button :: (Monad m, FormError error, ToMarkup children) => children -> Form m input error (HtmlUrl url) () ()
- label :: (Monad m, ToMarkup c) => c -> Form m input error (HtmlUrl url) () ()
- inputCheckbox :: forall x error input m url. (Monad m, FormInput input, FormError error, ErrorInputType error ~ input) => Bool -> Form m input error (HtmlUrl url) () Bool
- inputCheckboxes :: (Functor m, Monad m, FormError error, ErrorInputType error ~ input, FormInput input, ToMarkup lbl) => [(a, lbl)] -> (a -> Bool) -> Form m input error (HtmlUrl url) () [a]
- inputRadio :: (Functor m, Monad m, FormError error, ErrorInputType error ~ input, FormInput input, ToMarkup lbl) => [(a, lbl)] -> (a -> Bool) -> Form m input error (HtmlUrl url) () a
- select :: (Functor m, Monad m, FormError error, ErrorInputType error ~ input, FormInput input, ToMarkup lbl) => [(a, lbl)] -> (a -> Bool) -> Form m input error (HtmlUrl url) () a
- selectMultiple :: (Functor m, Monad m, FormError error, ErrorInputType error ~ input, FormInput input, ToMarkup lbl) => [(a, lbl)] -> (a -> Bool) -> Form m input error (HtmlUrl url) () [a]
- errorList :: (Monad m, ToMarkup error) => Form m input error (HtmlUrl url) () ()
- childErrorList :: (Monad m, ToMarkup error) => Form m input error (HtmlUrl url) () ()
- br :: Monad m => Form m input error (HtmlUrl url) () ()
- fieldset :: (Monad m, Functor m, ToMarkup c) => Form m input error c proof a -> Form m input error (HtmlUrl url) proof a
- ol :: (Monad m, Functor m, ToMarkup c) => Form m input error c proof a -> Form m input error (HtmlUrl url) proof a
- ul :: (Monad m, Functor m, ToMarkup c) => Form m input error c proof a -> Form m input error (HtmlUrl url) proof a
- li :: (Monad m, Functor m, ToMarkup c) => Form m input error c proof a -> Form m input error (HtmlUrl url) proof a
- form :: ToMarkup action => action -> [(Text, Text)] -> HtmlUrl url -> HtmlUrl url

# 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

textarea Source

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

inputCheckbox Source

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 |

inputCheckboxes Source

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] |

inputRadio Source

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 |

select Source

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 |

selectMultiple Source

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

form Source

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">`