ditto-lucid-0.4: Add support for using lucid with Ditto

Safe HaskellNone
LanguageHaskell98

Ditto.Lucid

Synopsis

Documentation

formGenGET Source #

Arguments

:: Applicative m 
=> Text

action url

-> [(Text, Text)]

hidden fields to add to form

-> HtmlT m b 
-> HtmlT m b 

create <form action=action method="GET" enctype="application/xxx-form-urlencoded">

formGenPOST Source #

Arguments

:: Applicative m 
=> Text

action url

-> [(Text, Text)]

hidden fields to add to form

-> HtmlT m b 
-> HtmlT m b 

create <form action=action method="POST" enctype="application/xxx-form-urlencoded">

setAttr :: (Environment m input, Functor m, Applicative f) => [Attribute] -> Form m input error (HtmlT f ()) a -> Form m input error (HtmlT f ()) a Source #

add an attribute to the Html for a form element.

errorList :: (Environment m input, ToHtml error, Monad f) => Form m input error (HtmlT f ()) () Source #

create a <ul> which contains all the errors related to the Form.

The ul will have the attribute class="ditto-error-list".

childErrorList :: (Environment m input, ToHtml error, Monad f) => Form m input error (HtmlT f ()) () Source #

create a <ul> which contains all the errors related to the Form.

Includes errors from child forms.

The ul will have the attribute class="ditto-error-list".

withErrors :: (Environment m input, ToHtml error, Monad f) => (HtmlT f () -> [error] -> HtmlT f ()) -> Form m input error (HtmlT f ()) a -> Form m input error (HtmlT f ()) a Source #

create a sibling element to the formlet which includes its error message

The ul will have the attribute class="ditto-error-list".

withChildErrors :: (Environment m input, ToHtml error, Monad f) => (HtmlT f () -> [error] -> HtmlT f ()) -> Form m input error (HtmlT f ()) a -> Form m input error (HtmlT f ()) a Source #

create a sibling element to the formlet which includes it and it's childrens' error message

The ul will have the attribute class="ditto-error-list".

br :: (Environment m input, Applicative f) => Form m input error (HtmlT f ()) () Source #

create a <br> tag.

fieldset :: (Environment m input, Functor m, Applicative f) => Form m input error (HtmlT f ()) a -> Form m input error (HtmlT f ()) a Source #

wrap a <fieldset class="ditto"> around a Form

ol :: (Environment m input, Functor m, Applicative f) => Form m input error (HtmlT f ()) a -> Form m input error (HtmlT f ()) a Source #

wrap an <ol class="ditto"> around a Form

ul :: (Environment m input, Functor m, Applicative f) => Form m input error (HtmlT f ()) a -> Form m input error (HtmlT f ()) a Source #

wrap a <ul class="ditto"> around a Form

li :: (Environment m input, Functor m, Applicative f) => Form m input error (HtmlT f ()) a -> Form m input error (HtmlT f ()) a Source #

wrap a <li class="ditto"> around a Form