Some fixes for mass input
This commit is contained in:
parent
53bf9496dd
commit
480b4e3304
@ -11,7 +11,7 @@ module Yesod.Form.MassInput
|
|||||||
|
|
||||||
import Yesod.Form.Types
|
import Yesod.Form.Types
|
||||||
import Yesod.Form.Functions
|
import Yesod.Form.Functions
|
||||||
import Yesod.Form.Fields (boolField)
|
import Yesod.Form.Fields (checkBoxField)
|
||||||
import Yesod.Core
|
import Yesod.Core
|
||||||
import Control.Monad.Trans.RWS (get, put, ask)
|
import Control.Monad.Trans.RWS (get, put, ask)
|
||||||
import Data.Maybe (fromMaybe)
|
import Data.Maybe (fromMaybe)
|
||||||
@ -97,7 +97,7 @@ $newline never
|
|||||||
<input type=hidden name=#{deleteName} value=yes>
|
<input type=hidden name=#{deleteName} value=yes>
|
||||||
|]
|
|]
|
||||||
_ -> do
|
_ -> do
|
||||||
(_, xml2) <- aFormToForm $ areq boolField FieldSettings
|
(_, xml2) <- aFormToForm $ areq checkBoxField FieldSettings
|
||||||
{ fsLabel = SomeMessage MsgDelete
|
{ fsLabel = SomeMessage MsgDelete
|
||||||
, fsTooltip = Nothing
|
, fsTooltip = Nothing
|
||||||
, fsName = Just deleteName
|
, fsName = Just deleteName
|
||||||
|
|||||||
@ -102,7 +102,7 @@ instance Monad m => Applicative (AForm m) where
|
|||||||
(AForm f) <*> (AForm g) = AForm $ \mr env ints -> do
|
(AForm f) <*> (AForm g) = AForm $ \mr env ints -> do
|
||||||
(a, b, ints', c) <- f mr env ints
|
(a, b, ints', c) <- f mr env ints
|
||||||
(x, y, ints'', z) <- g mr env ints'
|
(x, y, ints'', z) <- g mr env ints'
|
||||||
return (a <*> x, b `mappend` y, ints'', c `mappend` z)
|
return (a <*> x, b . y, ints'', c `mappend` z)
|
||||||
instance (Monad m, Monoid a) => Monoid (AForm m a) where
|
instance (Monad m, Monoid a) => Monoid (AForm m a) where
|
||||||
mempty = pure mempty
|
mempty = pure mempty
|
||||||
mappend a b = mappend <$> a <*> b
|
mappend a b = mappend <$> a <*> b
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
name: yesod-form
|
name: yesod-form
|
||||||
version: 1.3.5
|
version: 1.3.5.1
|
||||||
license: MIT
|
license: MIT
|
||||||
license-file: LICENSE
|
license-file: LICENSE
|
||||||
author: Michael Snoyman <michael@snoyman.com>
|
author: Michael Snoyman <michael@snoyman.com>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user