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

Safe HaskellNone
LanguageHaskell98

Text.Reform.Hamlet.Common

Contents

Synopsis

Documentation

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

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

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) () text Source #

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 #

Create an <input type="file"> element

This control may succeed even if the user does not actually select a file to upload. In that case the uploaded name will likely be "" and the file contents will be empty as well.

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

:: (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 a Source #

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

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

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

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

Orphan instances