diff --git a/Yesod/Form/Fields.hs b/Yesod/Form/Fields.hs index 611df896..2469b6ed 100644 --- a/Yesod/Form/Fields.hs +++ b/Yesod/Form/Fields.hs @@ -37,6 +37,7 @@ module Yesod.Form.Fields -- ** Optional , maybeStringInput , maybeDayInput + , maybeIntInput ) where import Yesod.Form.Core @@ -59,6 +60,11 @@ intInput n = mapFormXml fieldsToInput $ requiredFieldHelper intFieldProfile (nameSettings n) Nothing +maybeIntInput :: Integral i => String -> FormInput sub master (Maybe i) +maybeIntInput n = + mapFormXml fieldsToInput $ + optionalFieldHelper intFieldProfile (nameSettings n) Nothing + intField :: Integral i => FormFieldSettings -> FormletField sub y i intField = requiredFieldHelper intFieldProfile diff --git a/yesod.cabal b/yesod.cabal index 4129ff7c..659f3c1f 100644 --- a/yesod.cabal +++ b/yesod.cabal @@ -1,5 +1,5 @@ name: yesod -version: 0.5.2 +version: 0.5.3 license: BSD3 license-file: LICENSE author: Michael Snoyman