digestive-functors-blaze 0.2.0.0 → 0.2.0.1
raw patch · 2 files changed
+12/−8 lines, 2 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- Text.Digestive.Blaze.Html5: inputPassword :: (Monad m, Functor m, FormInput i f) => Form m i e BlazeFormHtml Text
+ Text.Digestive.Blaze.Html5: inputPassword :: (Monad m, Functor m, FormInput i f) => Bool -> Form m i e BlazeFormHtml Text
- Text.Digestive.Blaze.Html5: inputPassword' :: (Monad m, Functor m, FormInput i f) => Form m i e BlazeFormHtml String
+ Text.Digestive.Blaze.Html5: inputPassword' :: (Monad m, Functor m, FormInput i f) => Bool -> Form m i e BlazeFormHtml String
Files
digestive-functors-blaze.cabal view
@@ -1,5 +1,5 @@ Name: digestive-functors-blaze-Version: 0.2.0.0+Version: 0.2.0.1 Synopsis: Blaze frontend for the digestive-functors library Description: This is a blaze frontend for the digestive-functors library.
src/Text/Digestive/Blaze/Html5.hs view
@@ -140,21 +140,25 @@ ! A.value (toValue $ fromMaybe "" inp) inputPassword :: (Monad m, Functor m, FormInput i f)- => Form m i e BlazeFormHtml Text-inputPassword = Forms.inputText inputPasswordHTML Nothing+ => Bool -- ^ Retain input?+ -> Form m i e BlazeFormHtml Text -- ^ Resulting form+inputPassword retain = Forms.inputText (inputPasswordHTML retain) Nothing inputPassword' :: (Monad m, Functor m, FormInput i f)- => Form m i e BlazeFormHtml String-inputPassword' = Forms.inputString inputPasswordHTML Nothing+ => Bool -- ^ Retain input?+ -> Form m i e BlazeFormHtml String -- ^ Resulting form+inputPassword' retain = Forms.inputString (inputPasswordHTML retain) Nothing inputPasswordHTML :: (H.ToValue b, IsString b, Show a)- => a -> Maybe b -> FormHtml Html-inputPasswordHTML id' inp =+ => Bool -> a -> Maybe b -> FormHtml Html+inputPasswordHTML retain id' inp = createFormHtml $ \cfg -> applyClasses' [htmlInputClasses] cfg $ H.input ! A.type_ "password" ! A.name (toValue $ show id') ! A.id (toValue $ show id')- ! A.value (toValue $ fromMaybe "" inp)+ ! A.value (toValue value)+ where+ value = if retain then fromMaybe "" inp else "" inputCheckBox :: (Monad m, Functor m, FormInput i f) => Bool