ditto-lucid-0.2: 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 :: (Monad m, 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 :: (Monad m, 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 :: (Monad m, 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 :: (Monad m, ToHtml error, Monad f) => [Attribute] -> ([error] -> HtmlT f ()) -> Form m input error (HtmlT f ()) a -> Form m input error (HtmlT f ()) a 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".

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

create a <br> tag.

fieldset :: (Monad m, 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 :: (Monad m, 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 :: (Monad m, 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 :: (Monad m, 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