From 1b24ece1a40c9365f719472ca6e342c8c4065c25 Mon Sep 17 00:00:00 2001 From: dummy Date: Thu, 16 Oct 2014 02:31:20 +0000 Subject: [PATCH] hack TH --- Yesod/Form/Bootstrap3.hs | 186 +++++++++-- Yesod/Form/Fields.hs | 816 +++++++++++++++++++++++++++++++++++------------ Yesod/Form/Functions.hs | 257 ++++++++++++--- Yesod/Form/Jquery.hs | 134 ++++++-- Yesod/Form/MassInput.hs | 226 ++++++++++--- Yesod/Form/Nic.hs | 67 +++- 6 files changed, 1322 insertions(+), 364 deletions(-) diff --git a/Yesod/Form/Bootstrap3.hs b/Yesod/Form/Bootstrap3.hs index 84e85fc..1954fb4 100644 --- a/Yesod/Form/Bootstrap3.hs +++ b/Yesod/Form/Bootstrap3.hs @@ -26,6 +26,9 @@ import Data.String (IsString(..)) import Yesod.Core import qualified Data.Text as T +import qualified Text.Hamlet +import qualified Text.Blaze.Internal +import qualified Data.Foldable import Yesod.Form.Types import Yesod.Form.Functions @@ -152,44 +155,144 @@ renderBootstrap3 formLayout aform fragment = do let views = views' [] has (Just _) = True has Nothing = False - widget = [whamlet| - $newline never - #{fragment} - $forall view <- views -
- $case formLayout - $of BootstrapBasicForm - $if fvId view /= bootstrapSubmitId -