maybeIntInput
This commit is contained in:
parent
0c611f58fd
commit
4451378c5d
@ -37,6 +37,7 @@ module Yesod.Form.Fields
|
|||||||
-- ** Optional
|
-- ** Optional
|
||||||
, maybeStringInput
|
, maybeStringInput
|
||||||
, maybeDayInput
|
, maybeDayInput
|
||||||
|
, maybeIntInput
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Yesod.Form.Core
|
import Yesod.Form.Core
|
||||||
@ -59,6 +60,11 @@ intInput n =
|
|||||||
mapFormXml fieldsToInput $
|
mapFormXml fieldsToInput $
|
||||||
requiredFieldHelper intFieldProfile (nameSettings n) Nothing
|
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 :: Integral i => FormFieldSettings -> FormletField sub y i
|
||||||
intField = requiredFieldHelper intFieldProfile
|
intField = requiredFieldHelper intFieldProfile
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
name: yesod
|
name: yesod
|
||||||
version: 0.5.2
|
version: 0.5.3
|
||||||
license: BSD3
|
license: BSD3
|
||||||
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