renderBootstrap2
This commit is contained in:
parent
e61c98507b
commit
ad4ab651b4
@ -32,6 +32,7 @@ module Yesod.Form.Functions
|
|||||||
, renderDivs
|
, renderDivs
|
||||||
, renderDivsNoLabels
|
, renderDivsNoLabels
|
||||||
, renderBootstrap
|
, renderBootstrap
|
||||||
|
, renderBootstrap2
|
||||||
-- * Validation
|
-- * Validation
|
||||||
, check
|
, check
|
||||||
, checkBool
|
, checkBool
|
||||||
@ -387,6 +388,9 @@ $forall view <- views
|
|||||||
|]
|
|]
|
||||||
return (res, widget)
|
return (res, widget)
|
||||||
|
|
||||||
|
renderBootstrap :: Monad m => FormRender m a
|
||||||
|
renderBootstrap = renderBootstrap2
|
||||||
|
|
||||||
-- | Render a form using Bootstrap v2-friendly shamlet syntax.
|
-- | Render a form using Bootstrap v2-friendly shamlet syntax.
|
||||||
-- If you're using Bootstrap v3, then you should use the
|
-- If you're using Bootstrap v3, then you should use the
|
||||||
-- functions from module "Yesod.Form.Bootstrap3".
|
-- functions from module "Yesod.Form.Bootstrap3".
|
||||||
@ -404,8 +408,8 @@ $forall view <- views
|
|||||||
-- > ^{formWidget}
|
-- > ^{formWidget}
|
||||||
-- > <div .form-actions>
|
-- > <div .form-actions>
|
||||||
-- > <input .btn .primary type=submit value=_{MsgSubmit}>
|
-- > <input .btn .primary type=submit value=_{MsgSubmit}>
|
||||||
renderBootstrap :: Monad m => FormRender m a
|
renderBootstrap2 :: Monad m => FormRender m a
|
||||||
renderBootstrap aform fragment = do
|
renderBootstrap2 aform fragment = do
|
||||||
(res, views') <- aFormToForm aform
|
(res, views') <- aFormToForm aform
|
||||||
let views = views' []
|
let views = views' []
|
||||||
has (Just _) = True
|
has (Just _) = True
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user