minor refactor
This commit is contained in:
parent
76ac563627
commit
ad5741e4ae
@ -430,20 +430,18 @@ optionsFinite = do
|
|||||||
-- Special Forms --
|
-- Special Forms --
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
aformSection' :: (MonadHandler m, site ~ HandlerSite m, RenderMessage site FormMessage) => SomeMessage site -> AForm m ()
|
-- | Alternative implementation for 'aformSection' in a more standard that
|
||||||
|
-- allows tooltips and arbitrary attributs. Section header must be given through `fsLabel`
|
||||||
|
aformSection' :: (MonadHandler m, site ~ HandlerSite m, RenderMessage site FormMessage) => FieldSettings site -> AForm m ()
|
||||||
aformSection' = formToAForm . fmap (second pure) . formSection'
|
aformSection' = formToAForm . fmap (second pure) . formSection'
|
||||||
|
|
||||||
-- | Alternative implementation for 'formSection' in a more standard that shows how allows tooltips and attributs
|
-- | Alternative implementation for 'formSection' in a more standard that
|
||||||
formSection' :: (MonadHandler m, site ~ HandlerSite m, RenderMessage site FormMessage) => SomeMessage site -> MForm m (FormResult (), FieldView site) -- TODO: WIP, delete
|
-- allows tooltips and arbitrary attributs. Section header must be given through `fsLabel`
|
||||||
formSection' formSectionTitle = mreq noinputField sectionSettings Nothing
|
formSection' :: (MonadHandler m, site ~ HandlerSite m, RenderMessage site FormMessage) =>
|
||||||
|
FieldSettings site -> MForm m (FormResult (), FieldView site) -- TODO: WIP, delete
|
||||||
|
formSection' formSectionTitleSettings = mreq noinputField sectionSettings Nothing
|
||||||
where
|
where
|
||||||
sectionSettings = FieldSettings
|
sectionSettings = formSectionTitleSettings { fsId = Just idFormSectionNoinput }
|
||||||
{ fsLabel = formSectionTitle
|
|
||||||
, fsTooltip = Nothing
|
|
||||||
, fsId = Just idFormSectionNoinput
|
|
||||||
, fsName = Nothing
|
|
||||||
, fsAttrs = [("class",idFormSectionNoinput)] -- TODO: check if this it useful at all
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user