diff --git a/yesod-form/Yesod/Form/Bootstrap3.hs b/yesod-form/Yesod/Form/Bootstrap3.hs index ceec0da6..1336952c 100644 --- a/yesod-form/Yesod/Form/Bootstrap3.hs +++ b/yesod-form/Yesod/Form/Bootstrap3.hs @@ -30,6 +30,8 @@ import Yesod.Form.Functions -- | Create a new 'FieldSettings' with the classes that are -- required by Bootstrap v3. +-- +-- Since: yesod-form 1.3.8 bfs :: RenderMessage site msg => msg -> FieldSettings site bfs msg = FieldSettings (SomeMessage msg) Nothing Nothing Nothing [("class", "form-control")] @@ -38,24 +40,32 @@ bfs msg = -- | Add a placeholder attribute to a field. If you need i18n -- for the placeholder, currently you\'ll need to do a hack and -- use 'getMessageRender' manually. +-- +-- Since: yesod-form 1.3.8 withPlaceholder :: Text -> FieldSettings site -> FieldSettings site withPlaceholder placeholder fs = fs { fsAttrs = newAttrs } where newAttrs = ("placeholder", placeholder) : fsAttrs fs -- | Add an autofocus attribute to a field. +-- +-- Since: yesod-form 1.3.8 withAutofocus :: FieldSettings site -> FieldSettings site withAutofocus fs = fs { fsAttrs = newAttrs } where newAttrs = ("autofocus", "autofocus") : fsAttrs fs -- | Add the @input-lg@ CSS class to a field. +-- +-- Since: yesod-form 1.3.8 withLargeInput :: FieldSettings site -> FieldSettings site withLargeInput fs = fs { fsAttrs = newAttrs } where newAttrs = ("class", " input-lg ") : fsAttrs fs -- | Add the @input-sm@ CSS class to a field. +-- +-- Since: yesod-form 1.3.8 withSmallInput :: FieldSettings site -> FieldSettings site withSmallInput fs = fs { fsAttrs = newAttrs } where newAttrs = ("class", " input-sm ") : fsAttrs fs @@ -63,6 +73,8 @@ withSmallInput fs = fs { fsAttrs = newAttrs } -- | How many bootstrap grid columns should be taken (see -- 'BootstrapFormLayout'). +-- +-- Since: yesod-form 1.3.8 data BootstrapGridOptions = ColXs !Int | ColSm !Int @@ -103,6 +115,8 @@ addGO (ColLg _) _ = error "Yesod.Form.Bootstrap.addGO: never here" -- | The layout used for the bootstrap form. +-- +-- Since: yesod-form 1.3.8 data BootstrapFormLayout = BootstrapBasicForm | BootstrapInlineForm @@ -122,6 +136,8 @@ data BootstrapFormLayout = -- >